pax_global_header00006660000000000000000000000064120407411320014504gustar00rootroot0000000000000052 comment=eaed9c7c5de4f1f237af9f256d929c11b0a5e961 Gnome-Pie-0.5.4/000077500000000000000000000000001204074113200132725ustar00rootroot00000000000000Gnome-Pie-0.5.4/.gitignore000066400000000000000000000000551204074113200152620ustar00rootroot00000000000000*.c *.h build/* gnome-pie Makefile .valencia Gnome-Pie-0.5.4/.valencia000066400000000000000000000001041204074113200150500ustar00rootroot00000000000000version = 1 build_command = ./make.sh clean_command = rm -rf build/ Gnome-Pie-0.5.4/AUTHORS000066400000000000000000000006631204074113200143470ustar00rootroot00000000000000Code: Simon Schneegans Francesco Piccinno Translations: Riccardo Traverso Magnun Leno Kim Boram Eduardo Anabalon Grégoire Bellon-Gervais Alex Maxime Eugene Roskin Ting Zhou Martin Dinov Gnome-Pie-0.5.4/CMakeLists.txt000066400000000000000000000143241204074113200160360ustar00rootroot00000000000000################################################################ # Project Gnome-Pie ################################################################ project("gnomepie" C) cmake_minimum_required(VERSION 2.6) # Location where cmake first looks for modules. list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/vala) ################################################################ # Find Vala ################################################################ include(ValaPrecompile) include(ValaVersion) find_package(Vala) ensure_vala_version("0.11.0" MINIMUM) ################################################################ # Configure and find libraries ################################################################ find_package(PkgConfig) # check whether GTK3 is supported pkg_check_modules(GTK3 gtk+-3.0) if (${GTK3_FOUND}) pkg_check_modules(INDICATOR3 appindicator3-0.1) pkg_check_modules(UNIQUE REQUIRED unique-3.0) pkg_check_modules(WNCK REQUIRED libwnck-3.0) pkg_check_modules(BAMF REQUIRED libbamf3) else (${GTK3_FOUND}) pkg_check_modules(GTK2 REQUIRED gtk+-2.0) pkg_check_modules(INDICATOR appindicator-0.1) pkg_check_modules(UNIQUE REQUIRED unique-1.0) pkg_check_modules(WNCK REQUIRED libwnck-1.0) pkg_check_modules(BAMF REQUIRED libbamf) endif (${GTK3_FOUND}) pkg_check_modules(GIO REQUIRED gio-unix-2.0) pkg_check_modules(CAIRO REQUIRED cairo) pkg_check_modules(GEE REQUIRED gee-1.0) pkg_check_modules(X11 REQUIRED x11) pkg_check_modules(XML REQUIRED libxml-2.0) pkg_check_modules(XTST REQUIRED xtst) pkg_check_modules(GMENU3 libgnome-menu-3.0) find_library(M_LIB m) find_library(GTHREAD_LIB gthread-2.0) set(CFLAGS ${GIO_CFLAGS} ${GTK2_CFLAGS} ${GTK2_CFLAGS_OTHER} ${GTK3_CFLAGS} ${GTK3_CFLAGS_OTHER} ${CAIRO_CFLAGS} ${CAIRO_CFLAGS_OTHER} ${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 -w # -g ) # fallback to gtk2 if gtk3 wasn't found if (${GTK3_FOUND}) LIST(APPEND CFLAGS -DHAVE_GTK_3) endif (${GTK3_FOUND}) # fallback to gnome-menus2 if gnome-menus3 wasn't found if (${GMENU3_FOUND}) LIST(APPEND CFLAGS -DHAVE_GMENU_3) else (${GMENU3_FOUND}) pkg_check_modules(GMENU REQUIRED libgnome-menu) endif (${GMENU3_FOUND}) # notify application of presence of libappindicator if (${INDICATOR_FOUND}) LIST(APPEND CFLAGS -DHAVE_APPINDICATOR) endif (${INDICATOR_FOUND}) if (${INDICATOR3_FOUND}) LIST(APPEND CFLAGS -DHAVE_APPINDICATOR) endif (${INDICATOR3_FOUND}) add_definitions(${CFLAGS}) set(LIBS ${GIO_LIBRARIES} ${GTK2_LIBRARIES} ${GTK3_LIBRARIES} ${CAIRO_LIBRARIES} ${GEE_LIBRARIES} ${INDICATOR_LIBRARIES} ${INDICATOR3_LIBRARIES} ${XML_LIBRARIES} ${XTST_LIBRARIES} ${GMENU_LIBRARIES} ${GMENU3_LIBRARIES} ${UNIQUE_LIBRARIES} ${X11_LIBRARIES} ${WNCK_LIBRARIES} ${BAMF_LIBRARIES} ${M_LIB} ${GTHREAD_LIB} ) link_libraries(${LIBS}) set(LIB_PATHS ${GIO_LIBRARY_DIRS} ${GTK2_LIBRARY_DIRS} ${GTK3_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS} ${GEE_LIBRARY_DIRS} ${INDICATOR_LIBRARY_DIRS} ${INDICATOR3_LIBRARY_DIRS} ${XML_LIBRARY_DIRS} ${XTST_LIBRARY_DIRS} ${GMENU_LIBRARY_DIRS} ${GMENU3_LIBRARY_DIRS} ${UNIQUE_LIBRARY_DIRS} ${X11_LIBRARY_DIRS} ${WNCK_LIBRARY_DIRS} ${BAMF_LIBRARY_DIRS} ) link_directories(${LIB_PATHS}) set(INCLUDE_PATHS ${GIO_INCLUDE_DIRS} ${GTK2_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ${GEE_INCLUDE_DIRS} ${INDICATOR_INCLUDE_DIRS} ${INDICATOR3_INCLUDE_DIRS} ${XML_INCLUDE_DIRS} ${XTST_INCLUDE_DIRS} ${GMENU_INCLUDE_DIRS} ${GMENU3_INCLUDE_DIRS} ${UNIQUE_INCLUDE_DIRS} ${X11_INCLUDE_DIRS} ${BAMF_INCLUDE_DIRS} ${WNCK_INCLUDE_DIRS} ) include_directories(${INCLUDE_PATHS}) ################################################################ # Add executable ################################################################ set(EXECUTABLE_OUTPUT_PATH ${gnomepie_SOURCE_DIR}) set(VALA_PKGS cairo gee-1.0 x11 gio-unix-2.0 posix libxml-2.0 xtst ) if (${INDICATOR_FOUND}) LIST(APPEND VALA_PKGS appindicator-0.1) endif (${INDICATOR_FOUND}) if (${INDICATOR3_FOUND}) LIST(APPEND VALA_PKGS appindicator3-0.1) endif (${INDICATOR3_FOUND}) if (${GMENU3_FOUND}) LIST(APPEND VALA_PKGS libgnome-menu-3.0) else (${GMENU3_FOUND}) LIST(APPEND VALA_PKGS libgnome-menu) endif (${GMENU3_FOUND}) if (${GTK3_FOUND}) LIST(APPEND VALA_PKGS gtk+-3.0) LIST(APPEND VALA_PKGS gdk-x11-3.0) LIST(APPEND VALA_PKGS libbamf3) LIST(APPEND VALA_PKGS libwnck-3.0) LIST(APPEND VALA_PKGS unique-3.0) else (${GTK3_FOUND}) LIST(APPEND VALA_PKGS gtk+-2.0) LIST(APPEND VALA_PKGS gdk-x11-2.0) LIST(APPEND VALA_PKGS bamf) LIST(APPEND VALA_PKGS libwnck-1.0) LIST(APPEND VALA_PKGS unique-1.0) endif (${GTK3_FOUND}) add_subdirectory(src) ################################################################ # Add uninstall option ################################################################ configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/CMake_Uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/CMake_Uninstall.cmake" IMMEDIATE @ONLY) add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/CMake_Uninstall.cmake) ################################################################ # Summary ################################################################ message( "" ) message( "Summary:" ) message( " EXECUTABLE_OUTPUT_PATH = ${EXECUTABLE_OUTPUT_PATH}" ) message( " VALA_EXECUTABLE = ${VALA_EXECUTABLE}" ) message( "Libs:" ) message( " GTK2_LIBRARIES = ${GTK2_LIBRARIES}" ) message( " GTK3_LIBRARIES = ${GTK3_LIBRARIES}" ) message( " CAIRO_LIBRARIES = ${CAIRO_LIBRARIES}" ) message( " GEE_LIBRARIES = ${GEE_LIBRARIES}" ) message( " INDICATOR_LIBRARIES = ${INDICATOR_LIBRARIES}" ) message( " INDICATOR3_LIBRARIES = ${INDICATOR3_LIBRARIES}" ) message( " XML_LIBRARIES = ${XML_LIBRARIES}" ) message( " XTST_LIBRARIES = ${XTST_LIBRARIES}" ) 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( "" ) Gnome-Pie-0.5.4/CMake_Uninstall.cmake.in000066400000000000000000000022141204074113200177110ustar00rootroot00000000000000################################################################ # Project Gnome-Pie --- uninstall script ################################################################ if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) string(REGEX REPLACE "\n" ";" files "${files}") foreach (file ${files}) message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") if (EXISTS "$ENV{DESTDIR}${file}") execute_process( COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}" OUTPUT_VARIABLE rm_out RESULT_VARIABLE rm_retval ) if(NOT ${rm_retval} EQUAL 0) message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") endif (NOT ${rm_retval} EQUAL 0) else (EXISTS "$ENV{DESTDIR}${file}") message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") endif (EXISTS "$ENV{DESTDIR}${file}") endforeach(file) Gnome-Pie-0.5.4/COPYING000066400000000000000000001045131204074113200143310ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. 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. Copyright (C) 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 . 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: Copyright (C) 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 . 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 . Gnome-Pie-0.5.4/INSTALL000066400000000000000000000020341204074113200143220ustar00rootroot00000000000000#################################################################### # Compiling and installing Gnome-Pie # #################################################################### First of all, install all dependancies. For compilation and linking against GTK3: sudo apt-get install libgtk-3-dev libcairo2-dev libappindicator3-dev libgee-dev libxml2-dev libxtst-dev libgnome-menu-3-dev valac cmake libunique-3.0-dev libbamf3-dev libwnck-3-dev For compilation and linking against GTK2: 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 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! Gnome-Pie-0.5.4/Makefile000066400000000000000000000000411204074113200147250ustar00rootroot00000000000000BUILD_ROOT = 1 PROGRAM=gnome-pie Gnome-Pie-0.5.4/README.md000066400000000000000000000072331204074113200145560ustar00rootroot00000000000000Gnome-Pie ====== **Gnome-Pie** is a circular application launcher for Linux. It is made of several pies, each consisting of multiple slices. The user presses a key stroke which opens the desired pie. By activating one of its slices, applications may be launched, key presses may be simulated or files can be opened. Feel free to visit its **homepage** at http://gnome-pie.simonschneegans.de It is inspired by an addon written for the game World of Warcraft. (http://go-hero.net/opie/) ## Installing from a PPA! There is a PPA with a recent version of Gnome-Pie. If you simply want to test it, it's very easy to install: ~~~~ sudo add-apt-repository ppa:simonschneegans/testing sudo apt-get update sudo apt-get install gnome-pie ~~~~ ## Compiling and installing from source! First of all, install all dependancies. For compilation and linking against GTK3: ~~~~ sudo apt-get install libgtk-3-dev libcairo2-dev libappindicator3-dev libgee-dev libxml2-dev libxtst-dev libgnome-menu-3-dev valac cmake libunique-3.0-dev libbamf3-dev libwnck-3-dev bamfdaemon ~~~~ For compilation and linking against GTK2: ~~~~ 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 bamfdaemon ~~~~ 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! Now you may launch it by Pressing A to open up a default Pie with your default applications. There are some other Pies defined --- just open up the configuration dialog by activating the appropriate entry in the appindicator menu or by launching gnome-pie for a second time. There you may configure the Pies to suit your needs. You can open Pies not only by presing their key stroke. Alternatively you may open any Pie by invoking gnome-pie --open 123 where 123 is the ID of the desired Pie (which is displayed in the configuration dialog). ## Support my work! I really like working on Gnome-Pie — and you can help improving it! There are multiple ways: ### Translate Gnome-Pie! This is really easy: [There is an easy-to-follow step-by-step-guide available](http://www.simonschneegans.de/?p=439)! ### Create Themes for Gnome-Pie! If you have some ideas on how Gnome-Pie should look: It’s easy to create new themes! I would love to include some true art in this software! [There is an comprehensive guide as well](http://www.simonschneegans.de/?p=246). ### Donate! If you can’t afford the time to do the stuff mentioned above, but still want to help — you can help improving this software by buying some drinks for a poor student ;) ! You can [do this with the Flattr](http://flattr.com/thing/468485/Gnome-Pie) or by [donating via PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X65SUVC4ZTQSC). If you happen to dislike PayPal, send a mail to code@simonschneegans.de and we can chat about this! ## License Copyright (C) 2011-2012 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 . Gnome-Pie-0.5.4/TRANSLATING000066400000000000000000000027331204074113200150100ustar00rootroot00000000000000#################################################################### # 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. Update 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" Gnome-Pie-0.5.4/cmake/000077500000000000000000000000001204074113200143525ustar00rootroot00000000000000Gnome-Pie-0.5.4/cmake/vala/000077500000000000000000000000001204074113200152755ustar00rootroot00000000000000Gnome-Pie-0.5.4/cmake/vala/FindVala.cmake000066400000000000000000000053311204074113200177650ustar00rootroot00000000000000## # Copyright 2009-2010 Jakob Westhoff. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY JAKOB WESTHOFF ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL JAKOB WESTHOFF OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # The views and conclusions contained in the software and documentation are those # of the authors and should not be interpreted as representing official policies, # either expressed or implied, of Jakob Westhoff ## ## # Find module for the Vala compiler (valac) # # This module determines wheter a Vala compiler is installed on the current # system and where its executable is. # # Call the module using "find_package(Vala) from within your CMakeLists.txt. # # The following variables will be set after an invocation: # # VALA_FOUND Whether the vala compiler has been found or not # VALA_EXECUTABLE Full path to the valac executable if it has been found # VALA_VERSION Version number of the available valac ## # Search for the valac executable in the usual system paths. find_program(VALA_EXECUTABLE NAMES valac) # Handle the QUIETLY and REQUIRED arguments, which may be given to the find call. # Furthermore set VALA_FOUND to TRUE if Vala has been found (aka. # VALA_EXECUTABLE is set) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Vala DEFAULT_MSG VALA_EXECUTABLE) mark_as_advanced(VALA_EXECUTABLE) # Determine the valac version if(VALA_FOUND) execute_process(COMMAND ${VALA_EXECUTABLE} "--version" OUTPUT_VARIABLE "VALA_VERSION") string(REPLACE "Vala" "" "VALA_VERSION" ${VALA_VERSION}) string(STRIP ${VALA_VERSION} "VALA_VERSION") endif(VALA_FOUND) Gnome-Pie-0.5.4/cmake/vala/ParseArguments.cmake000066400000000000000000000023221204074113200212360ustar00rootroot00000000000000## # This is a helper Macro to parse optional arguments in Macros/Functions # It has been taken from the public CMake wiki. # See http://www.cmake.org/Wiki/CMakeMacroParseArguments for documentation and # licensing. ## macro(parse_arguments prefix arg_names option_names) set(DEFAULT_ARGS) foreach(arg_name ${arg_names}) set(${prefix}_${arg_name}) endforeach(arg_name) foreach(option ${option_names}) set(${prefix}_${option} FALSE) endforeach(option) set(current_arg_name DEFAULT_ARGS) set(current_arg_list) foreach(arg ${ARGN}) set(larg_names ${arg_names}) list(FIND larg_names "${arg}" is_arg_name) if(is_arg_name GREATER -1) set(${prefix}_${current_arg_name} ${current_arg_list}) set(current_arg_name ${arg}) set(current_arg_list) else(is_arg_name GREATER -1) set(loption_names ${option_names}) list(FIND loption_names "${arg}" is_option) if(is_option GREATER -1) set(${prefix}_${arg} TRUE) else(is_option GREATER -1) set(current_arg_list ${current_arg_list} ${arg}) endif(is_option GREATER -1) endif(is_arg_name GREATER -1) endforeach(arg) set(${prefix}_${current_arg_name} ${current_arg_list}) endmacro(parse_arguments) Gnome-Pie-0.5.4/cmake/vala/ValaPrecompile.cmake000066400000000000000000000154301204074113200212050ustar00rootroot00000000000000## # Copyright 2009-2010 Jakob Westhoff. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY JAKOB WESTHOFF ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL JAKOB WESTHOFF OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # The views and conclusions contained in the software and documentation are those # of the authors and should not be interpreted as representing official policies, # either expressed or implied, of Jakob Westhoff ## include(ParseArguments) find_package(Vala REQUIRED) ## # Compile vala files to their c equivalents for further processing. # # The "vala_precompile" macro takes care of calling the valac executable on the # given source to produce c files which can then be processed further using # default cmake functions. # # The first parameter provided is a variable, which will be filled with a list # of c files outputted by the vala compiler. This list can than be used in # conjuction with functions like "add_executable" or others to create the # neccessary compile rules with CMake. # # The initial variable is followed by a list of .vala files to be compiled. # Please take care to add every vala file belonging to the currently compiled # project or library as Vala will otherwise not be able to resolve all # dependencies. # # The following sections may be specified afterwards to provide certain options # to the vala compiler: # # PACKAGES # A list of vala packages/libraries to be used during the compile cycle. The # package names are exactly the same, as they would be passed to the valac # "--pkg=" option. # # OPTIONS # A list of optional options to be passed to the valac executable. This can be # used to pass "--thread" for example to enable multi-threading support. # # CUSTOM_VAPIS # A list of custom vapi files to be included for compilation. This can be # useful to include freshly created vala libraries without having to install # them in the system. # # GENERATE_VAPI # Pass all the needed flags to the compiler to create an internal vapi for # the compiled library. The provided name will be used for this and a # .vapi file will be created. # # GENERATE_HEADER # Let the compiler generate a header file for the compiled code. There will # be a header file as well as an internal header file being generated called # .h and _internal.h # # The following call is a simple example to the vala_precompile macro showing # an example to every of the optional sections: # # vala_precompile(VALA_C # source1.vala # source2.vala # source3.vala # PACKAGES # gtk+-2.0 # gio-1.0 # posix # DIRECTORY # gen # OPTIONS # --thread # CUSTOM_VAPIS # some_vapi.vapi # GENERATE_VAPI # myvapi # GENERATE_HEADER # myheader # ) # # Most important is the variable VALA_C which will contain all the generated c # file names after the call. ## macro(vala_precompile output) parse_arguments(ARGS "PACKAGES;OPTIONS;DIRECTORY;GENERATE_HEADER;GENERATE_VAPI;CUSTOM_VAPIS" "" ${ARGN}) if(ARGS_DIRECTORY) set(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${ARGS_DIRECTORY}) else(ARGS_DIRECTORY) set(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) endif(ARGS_DIRECTORY) include_directories(${DIRECTORY}) set(vala_pkg_opts "") foreach(pkg ${ARGS_PACKAGES}) list(APPEND vala_pkg_opts "--pkg=${pkg}") endforeach(pkg ${ARGS_PACKAGES}) set(in_files "") set(out_files "") set(${output} "") foreach(src ${ARGS_DEFAULT_ARGS}) list(APPEND in_files "${CMAKE_CURRENT_SOURCE_DIR}/${src}") string(REPLACE ".vala" ".c" src ${src}) string(REPLACE ".gs" ".c" src ${src}) set(out_file "${DIRECTORY}/${src}") list(APPEND out_files "${DIRECTORY}/${src}") list(APPEND ${output} ${out_file}) endforeach(src ${ARGS_DEFAULT_ARGS}) set(custom_vapi_arguments "") if(ARGS_CUSTOM_VAPIS) foreach(vapi ${ARGS_CUSTOM_VAPIS}) if(${vapi} MATCHES ${CMAKE_SOURCE_DIR} OR ${vapi} MATCHES ${CMAKE_BINARY_DIR}) list(APPEND custom_vapi_arguments ${vapi}) else (${vapi} MATCHES ${CMAKE_SOURCE_DIR} OR ${vapi} MATCHES ${CMAKE_BINARY_DIR}) list(APPEND custom_vapi_arguments ${CMAKE_CURRENT_SOURCE_DIR}/${vapi}) endif(${vapi} MATCHES ${CMAKE_SOURCE_DIR} OR ${vapi} MATCHES ${CMAKE_BINARY_DIR}) endforeach(vapi ${ARGS_CUSTOM_VAPIS}) endif(ARGS_CUSTOM_VAPIS) set(vapi_arguments "") if(ARGS_GENERATE_VAPI) list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_VAPI}.vapi") set(vapi_arguments "--internal-vapi=${ARGS_GENERATE_VAPI}.vapi") # Header and internal header is needed to generate internal vapi if (NOT ARGS_GENERATE_HEADER) set(ARGS_GENERATE_HEADER ${ARGS_GENERATE_VAPI}) endif(NOT ARGS_GENERATE_HEADER) endif(ARGS_GENERATE_VAPI) set(header_arguments "") if(ARGS_GENERATE_HEADER) list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_HEADER}.h") list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_HEADER}_internal.h") list(APPEND header_arguments "--header=${DIRECTORY}/${ARGS_GENERATE_HEADER}.h") list(APPEND header_arguments "--internal-header=${DIRECTORY}/${ARGS_GENERATE_HEADER}_internal.h") endif(ARGS_GENERATE_HEADER) add_custom_command(OUTPUT ${out_files} COMMAND ${VALA_EXECUTABLE} ARGS "-C" ${header_arguments} ${vapi_arguments} "-b" ${CMAKE_CURRENT_SOURCE_DIR} "-d" ${DIRECTORY} ${vala_pkg_opts} ${ARGS_OPTIONS} ${in_files} ${custom_vapi_arguments} DEPENDS ${in_files} ${ARGS_CUSTOM_VAPIS} ) endmacro(vala_precompile) Gnome-Pie-0.5.4/cmake/vala/ValaVersion.cmake000066400000000000000000000071021204074113200205300ustar00rootroot00000000000000## # Copyright 2009-2010 Jakob Westhoff. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY JAKOB WESTHOFF ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL JAKOB WESTHOFF OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # The views and conclusions contained in the software and documentation are those # of the authors and should not be interpreted as representing official policies, # either expressed or implied, of Jakob Westhoff ## include(ParseArguments) find_package(Vala REQUIRED) ## # Ensure a certain valac version is available # # The initial argument is the version to check for # # It may be followed by a optional parameter to specifiy a version range. The # following options are valid: # # EXACT # Vala needs to be available in the exact version given # # MINIMUM # The provided version is the minimum version. Therefore Vala needs to be # available in the given version or any higher version # # MAXIMUM # The provided version is the maximum. Therefore Vala needs to be available # in the given version or any version older than this # # If no option is specified the version will be treated as a minimal version. ## macro(ensure_vala_version version) parse_arguments(ARGS "" "MINIMUM;MAXIMUM;EXACT" ${ARGN}) set(compare_message "") set(error_message "") if(ARGS_MINIMUM) set(compare_message "a minimum ") set(error_message "or greater ") elseif(ARGS_MAXIMUM) set(compare_message "a maximum ") set(error_message "or less ") endif(ARGS_MINIMUM) message(STATUS "checking for ${compare_message}Vala version of ${version}" ) unset(version_accepted) # MINIMUM is the default if no option is specified if(ARGS_EXACT) if(${VALA_VERSION} VERSION_EQUAL ${version} ) set(version_accepted TRUE) endif(${VALA_VERSION} VERSION_EQUAL ${version}) elseif(ARGS_MAXIMUM) if(${VALA_VERSION} VERSION_LESS ${version} OR ${VALA_VERSION} VERSION_EQUAL ${version}) set(version_accepted TRUE) endif(${VALA_VERSION} VERSION_LESS ${version} OR ${VALA_VERSION} VERSION_EQUAL ${version}) else(ARGS_MAXIMUM) if(${VALA_VERSION} VERSION_GREATER ${version} OR ${VALA_VERSION} VERSION_EQUAL ${version}) set(version_accepted TRUE) endif(${VALA_VERSION} VERSION_GREATER ${version} OR ${VALA_VERSION} VERSION_EQUAL ${version}) endif(ARGS_EXACT) if (NOT version_accepted) message(FATAL_ERROR "Vala version ${version} ${error_message}is required." ) endif(NOT version_accepted) message(STATUS " found Vala, version ${VALA_VERSION}" ) endmacro(ensure_vala_version) Gnome-Pie-0.5.4/make.sh000077500000000000000000000000761204074113200145510ustar00rootroot00000000000000#!/bin/sh mkdir build cd build; cmake ..; make && ( cd .. ) Gnome-Pie-0.5.4/resources/000077500000000000000000000000001204074113200153045ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/gnome-pie-symbolic.svg000066400000000000000000000546751204074113200215450ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/gnome-pie.1000066400000000000000000000017651204074113200172570ustar00rootroot00000000000000.\" 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 . .PP This manual page was written by Alessandro Ghedini , for the Debian project (and may be used by others). Gnome-Pie-0.5.4/resources/gnome-pie.desktop000077500000000000000000000002011204074113200205530ustar00rootroot00000000000000[Desktop Entry] Type=Application Name=Gnome-Pie Comment=Cakes don't lie. Exec=gnome-pie Icon=gnome-pie Categories=GNOME;Utility; Gnome-Pie-0.5.4/resources/gnome-pie.svg000066400000000000000000003567651204074113200177330ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/locale/000077500000000000000000000000001204074113200165435ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/bg/000077500000000000000000000000001204074113200171335ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/bg/LC_MESSAGES/000077500000000000000000000000001204074113200207205ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/bg/LC_MESSAGES/bg.po000066400000000000000000000374311204074113200216600ustar00rootroot00000000000000# English translations for PACKAGE package. # Copyright (C) 2012 Simon Schneegans # This file is distributed under the same license as the PACKAGE package. # , 2012. # msgid "" msgstr "" "Project-Id-Version: gnomepie 0.4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-02-29 16:07-0300\n" "PO-Revision-Date: 2012-09-02 08:05-0400\n" "Last-Translator: Martin Dinov \n" "Language-Team: Bulgarian\n" "Language: bg\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../../src/actions/keyAction.vala:34 msgid "Press hotkey" msgstr "Моля натиснете клавишната комбинация" #: ../../src/actions/keyAction.vala:36 msgid "Simulates the activation of a hotkey." msgstr "Симулира натискането на клавишната комбинациа." #: ../../src/actions/pieAction.vala:34 msgid "Open Pie" msgstr "Отворете паят" #: ../../src/actions/pieAction.vala:36 msgid "Opens another Pie of Gnome-Pie. You may create sub menus this way." msgstr "Отваря нов Гноум-Пай пай. Може да направите под-менюта по този начин." #: ../../src/actions/appAction.vala:34 msgid "Launch application" msgstr "Старт на апликациа" #: ../../src/actions/appAction.vala:36 msgid "Executes the given command." msgstr "Стартиране на командата" #: ../../src/actions/uriAction.vala:34 msgid "Open URI" msgstr "Отварете URI" #: ../../src/actions/uriAction.vala:36 msgid "Opens a given location. You may use URL's or files paths." msgstr "Отваря определена локациа. Може да изпозжате URL или файлови пътеки." #: ../../src/actions/actionRegistry.vala:119 msgid "Trash" msgstr "Боклук" #: ../../src/utilities/trigger.vala:163 msgid "Button %i" msgstr "Бутон %i" #: ../../src/utilities/trigger.vala:166 msgid "LeftButton" msgstr "Ляв Бутон" #: ../../src/utilities/trigger.vala:168 msgid "RightButton" msgstr "ДесенБутон" #: ../../src/utilities/trigger.vala:170 msgid "MiddleButton" msgstr "СреденБутон" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:196 msgid "Turbo" msgstr "Турбо" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:192 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:198 msgid "Delayed" msgstr "Закаснено" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:200 msgid "Centered" msgstr "Зентрирано" #: ../../src/utilities/trigger.vala:212 ../../src/utilities/trigger.vala:213 #: ../../src/utilities/key.vala:65 ../../src/utilities/bindingManager.vala:161 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:187 msgid "Applications" msgstr "Приложения" #: ../../src/pies/defaultConfig.vala:45 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/piePreview.vala:155 msgid "Do you really want to delete this Slice?" msgstr "Сигурни ли сте че искате да изтрийте това парче?" #: ../../src/gui/themeList.vala:62 msgid "Themes" msgstr "Теми" #: ../../src/gui/themeList.vala:99 msgid "By" msgstr "По" #: ../../src/gui/newSliceWindow.vala:291 msgid "Rename me!" msgstr "Прейменувай ме!" #: ../../src/gui/triggerSelectWindow.vala:166 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/piePreviewRenderer.vala:412 msgid "Click to edit" msgstr "Кликнете за да редактирате" #: ../../src/gui/piePreviewRenderer.vala:412 #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Drag to move" msgstr "Плъзнете за да преместите" #: ../../src/gui/piePreviewRenderer.vala:415 msgid "Click to add a new Slice" msgstr "Кликнете за да добавите ново парче" #: ../../src/gui/piePreviewRenderer.vala:419 msgid "Drop to add as new Slice" msgstr "Пуснете за да добавите ново парче" #: ../../src/gui/piePreviewRenderer.vala:422 msgid "Drop to move Slice" msgstr "Пуснете за да преместите парчето" #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Click to delete" msgstr "Кликнете за да изтриете" #: ../../src/gui/preferencesWindow.vala:175 msgid "No Pie selected." msgstr "Няма селектиран пай" #: ../../src/gui/preferencesWindow.vala:215 msgid "New Pie" msgstr "Нов пай" #: ../../src/gui/preferencesWindow.vala:228 msgid "" "Do you really want to delete the selected Pie with all contained Slices?" msgstr "" "Сигурни ли сте че искате да изтриете избраният пай със всички съхранени парчета вътре?" #: ../../src/gui/triggerSelectButton.vala:63 msgid "Press a hotkey ..." msgstr "Натиснете клавиатурната комбинация" #: ../../src/gui/sliceTypeList.vala:60 msgid "Slice types" msgstr "Типове парчета" #: ../../src/gui/iconSelectWindow.vala:186 msgid "All icons" msgstr "Всички икони" #: ../../src/gui/iconSelectWindow.vala:188 msgid "Actions" msgstr "Действия" #: ../../src/gui/iconSelectWindow.vala:189 msgid "Places" msgstr "Места" #: ../../src/gui/iconSelectWindow.vala:190 msgid "File types" msgstr "Типове файлове" #: ../../src/gui/iconSelectWindow.vala:191 msgid "Emotes" msgstr "Емоти" #: ../../src/gui/iconSelectWindow.vala:192 msgid "Miscellaneous" msgstr "Други" #: ../../src/gui/iconSelectWindow.vala:267 #: ../../src/gui/iconSelectWindow.vala:269 msgid "All supported image formats" msgstr "Всички подъръжани картинни формати" #: ../../src/actionGroups/windowListGroup.vala:34 msgid "Group: Window List" msgstr "Група: Прозорецов лист" #: ../../src/actionGroups/windowListGroup.vala:36 msgid "Shows a Slice for each of your opened Windows. Almost like Alt-Tab." msgstr "Показва парче за всеки от отворените прозорци. Почити като Алт-Таб." #: ../../src/actionGroups/devicesGroup.vala:35 msgid "Group: Devices" msgstr "Група: Узтройства" #: ../../src/actionGroups/devicesGroup.vala:37 msgid "Shows a Slice for each plugged in devices, like USB-Sticks." msgstr "Показва парче за всеки от включените узтройства, като USB-стикове." #: ../../src/actionGroups/devicesGroup.vala:85 msgid "Root" msgstr "Рут" #: ../../src/actionGroups/bookmarkGroup.vala:36 msgid "Group: Bookmarks" msgstr "Група: Букмаркери" #: ../../src/actionGroups/bookmarkGroup.vala:38 msgid "Shows a Slice for each of your directory Bookmarks." msgstr "Показва парче за всеки от директорията Букмарки." #: ../../src/actionGroups/sessionGroup.vala:35 msgid "Group: Session Control" msgstr "Група: Контрол на сесията" #: ../../src/actionGroups/sessionGroup.vala:37 msgid "Shows a Slice for Shutdown, Reboot, and Hibernate." msgstr "Показва парче за Спиране на системата, рестартиране, и зимуване." #: ../../src/actionGroups/sessionGroup.vala:60 msgid "Shutdown" msgstr "Спиране" #: ../../src/actionGroups/sessionGroup.vala:63 msgid "Logout" msgstr "Излизане" #: ../../src/actionGroups/sessionGroup.vala:66 msgid "Reboot" msgstr "Рестарт" #: ../../src/actionGroups/menuGroup.vala:35 msgid "Group: Main menu" msgstr "Група: Главно меню" #: ../../src/actionGroups/menuGroup.vala:37 msgid "Displays your main menu structure." msgstr "Показва главаната ви меню структура." #: ../../src/actionGroups/clipboardGroup.vala:64 msgid "Group: Clipboard" msgstr "Група: Клипборд" #: ../../src/actionGroups/clipboardGroup.vala:66 msgid "Manages your Clipboard." msgstr "Управлява клипбордът." #: ../ui/icon_select.ui:8 msgid "Select an icon" msgstr "Изберете икона" #: ../ui/icon_select.ui:85 msgid "Icon Theme" msgstr "Иконна тема" #: ../ui/icon_select.ui:105 msgid "Custom Icon" msgstr "Собствена икона" #: ../ui/rename_pie.ui:8 msgid "Rename a Pie" msgstr "Прейменувайте парче" #: ../ui/preferences.ui:8 msgid "Gnome-Pie Settings" msgstr "Гноум-Пай Сетинги" #: ../ui/preferences.ui:27 ../ui/settings.ui:9 msgid "General Settings" msgstr "Общи Сетинги" #: ../ui/preferences.ui:261 msgid "" "This Pie is empty!\n" "\n" "Start adding Slices to it! This can be done by dragging stuff to the " "plus sign below. You can try a lot! For example application launchers or " "folders. Even URLs from your browser are possible... \n" "\n" "For manual and advanced configuration click on the plus sign." msgstr "" "This Pie is empty!\n" "\n" "Почнете да добавяте парчета към него! Това може да направите като изплъзкате неща към " "плюс симвулът долу. Може да пробвате различни неша! Примерно апликационни стартери или " "папки. Даже URLs от вашият сайт са възможни... \n" "\n" "За ръчна и напреднала конфигурация натиснете плюсът." #: ../ui/preferences.ui:282 msgid "" "You have no Pies!\n" "\n" "Start by creating one! This can be done by clicking on the tiny little " "plus sign in the lower left corner." msgstr "" "Нямате пайове!\n" "\n" "Почнете със създаването на пай! Това може да се направи със кликването на малкият " "плюс символът в долният ляв край." #: ../ui/slice_select.ui:9 msgid "Slice Options" msgstr "Опций за парчета" #: ../ui/slice_select.ui:139 msgid "There are no options for this Slice type." msgstr "Няма опций за този тип парче." #: ../ui/slice_select.ui:165 msgid "Name of the Slice " msgstr "Име на парчето " #: ../ui/slice_select.ui:204 msgid "URI to open" msgstr "URI да се отвори" #: ../ui/slice_select.ui:243 msgid "Command to execute" msgstr "Команда за стартиране" #: ../ui/slice_select.ui:282 msgid "Hotkey to press" msgstr "Клавишна комбинация за използване" #: ../ui/slice_select.ui:311 msgid "Pie to open" msgstr "Пай за отваряне" #: ../ui/slice_select.ui:340 msgid "Is Quick Action" msgstr "Е бързо действие" #: ../ui/slice_select.ui:354 ../ui/slice_select.ui:355 msgid "This Slice will be executed when you click in the middle of the Pie." msgstr "Тази част ще се стартира като кликнете върху паят." #: ../ui/slice_select.ui:388 msgid "Slice options" msgstr "Опций за парчето" #: ../ui/settings.ui:74 msgid "Start Gnome-Pie on login" msgstr "Пускане на Гноум-Пай на логин" #: ../ui/settings.ui:79 ../ui/settings.ui:80 msgid "If checked, Gnome-Pie will start silently everytime you log in." msgstr "Ако избрано, Гноум-Пай ще стартира тихо при всяко влизане в системата." #: ../ui/settings.ui:93 msgid "Display panel icon " msgstr "Покажи панеловата икона " #: ../ui/settings.ui:98 ../ui/settings.ui:99 msgid "" "If not checked, you can access this menu by launching Gnome-Pie a second " "time." msgstr "" "Ако не е избрано, можете да влезете в тожа меню като стартирате Гноум-Пай втори " "път." #: ../ui/settings.ui:118 msgid "Behavior" msgstr "Държание" #: ../ui/settings.ui:175 msgid "Global scale" msgstr "Глобална скала" #: ../ui/settings.ui:207 msgid "Display Slice labels" msgstr "Покажи найменование на парчето" #: ../ui/settings.ui:212 ../ui/settings.ui:213 msgid "" "Displays the name of each Slice next to it. Only available if supported by " "the theme." msgstr "Показва името на всяко парче до парчето. Само ако се подържа от " "темата." #: ../ui/settings.ui:232 msgid "Appearance" msgstr "Външен вид" #: ../ui/trigger_select.ui:8 msgid "Activation Settings" msgstr "Сетинги за активация" #: ../ui/trigger_select.ui:86 msgid "It's possible to bind mouse buttons as well!" msgstr "Можете и копчетата на мишката да програмирате!" #: ../ui/trigger_select.ui:118 msgid "Turbo mode" msgstr "Турбо модус" #: ../ui/trigger_select.ui:123 ../ui/trigger_select.ui:124 msgid "If checked, the Pie will close when you release the chosen hot key." msgstr "Ако избрано, паят ще се затвори когато изберете избраната от вас клавиятурна комбиназия." #: ../ui/trigger_select.ui:137 msgid "Long press for activation" msgstr "Натиснете дълго за активиране" #: ../ui/trigger_select.ui:142 ../ui/trigger_select.ui:143 msgid "" "If checked, the Pie will only open if you press this hot key a bit longer." msgstr "" "Ако избрано, паят ще се отвори само ако задържите клавишната комбинация за по дълго." #: ../ui/trigger_select.ui:156 msgid "Open Pie centered on the screen" msgstr "Отворете пай центриран на екранът" #: ../ui/trigger_select.ui:161 ../ui/trigger_select.ui:162 msgid "" "If checked, the Pie will open in the middle of your screen. Else it will pop " "up at your pointer." msgstr "" "Ако избрано, паят ще се отвори в средата на екранът. Иначе ще се отвори " "при пойнтерът на мишката." #: ../ui/trigger_select.ui:181 msgid "Activation options" msgstr "Активазия опций" Gnome-Pie-0.5.4/resources/locale/bg/LC_MESSAGES/gnomepie.mo000066400000000000000000000261301204074113200230620ustar00rootroot00000000000000l|0 (1 Z     $ @ K X a k u x        U "d H (   2 9 U ` q ~        ?CXJ`NH,  5 >K T bm  9B ]i p{    232Cf;%  # 1=V[)bDf8> D O[jb&9AQ ?+D1p(9 -EsC8W//=_< ,.F b  !.)3?]3 p!""U"",#O#a#7r##(##$$ 0$;$P$ l$z$$$$$>$,%zA%|%9& V&a&Bu&E&&'%)'O'l''' '' 'u'YC(z(v))W))*4*5P***4*[*)+ + ,,,,G,]2g0 Vf;Ti1bFdSJE4.RMZ6`8lY%X-h'?(jk953/, ^_)A+U!CNQK\&< [eIc $WG:P=#Da7BH OL"@*> This Pie is empty! Start adding Slices to it! This can be done by dragging stuff to the plus sign below. You can try a lot! For example application launchers or folders. Even URLs from your browser are possible... For manual and advanced configuration click on the plus sign.You have no Pies! Start by creating one! This can be done by clicking on the tiny little plus sign in the lower left corner.ActionsActivation SettingsActivation optionsAll iconsAll supported image formatsAppearanceApplicationsBehaviorBookmarksButton %iByCenteredClick to add a new SliceClick to deleteClick to editCloseCommand to executeCustom IconDelayedDisplay Slice labelsDisplay panel icon Displays the name of each Slice next to it. Only available if supported by the theme.Displays your main menu structure.Do you really want to delete the selected Pie with all contained Slices?Do you really want to delete this Slice?Drag to moveDrop to add as new SliceDrop to move SliceEmotesExecutes the given command.File typesGeneral SettingsGlobal scaleGnome-Pie SettingsGroup: BookmarksGroup: ClipboardGroup: DevicesGroup: Main menuGroup: Session ControlGroup: Window ListHotkey to pressIcon ThemeIf checked, Gnome-Pie will start silently everytime you log in.If checked, the Pie will close when you release the chosen hot key.If checked, the Pie will only open if you press this hot key a bit longer.If checked, the Pie will open in the middle of your screen. Else it will pop up at your pointer.If not checked, you can access this menu by launching Gnome-Pie a second time.Is Quick ActionIt's possible to bind mouse buttons as well!Launch applicationLeftButtonLogoutLong press for activationMain MenuManages your Clipboard.MaximizeMiddleButtonMinimizeMiscellaneousMultimediaName of the Slice New PieNext TrackNo Pie selected.Not boundOpen PieOpen Pie centered on the screenOpen URIOpens a given location. You may use URL's or files paths.Opens another Pie of Gnome-Pie. You may create sub menus this way.Pie to openPlacesPlay/PausePress a hotkey ...Press hotkeyPrevious TrackRebootRename a PieRename me!RestoreRightButtonRootScaleSelect an iconSessionShows a Slice for Shutdown, Reboot, and Hibernate.Shows a Slice for each of your directory Bookmarks.Shows a Slice for each of your opened Windows. Almost like Alt-Tab.Shows a Slice for each plugged in devices, like USB-Sticks.ShutdownSimulates the activation of a hotkey.Slice OptionsSlice optionsSlice typesStart Gnome-Pie on loginStopThemesThere are no options for this Slice type.This Slice will be executed when you click in the middle of the Pie.This hotkey is already assigned to the pie "%s"! Please select another one or cancel your selection.TrashTurboTurbo modeURI to openWindowProject-Id-Version: gnomepie 0.4 Report-Msgid-Bugs-To: POT-Creation-Date: 2012-02-29 16:07-0300 PO-Revision-Date: 2012-09-02 08:05-0400 Last-Translator: Martin Dinov Language-Team: Bulgarian Language: bg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); This Pie is empty! Почнете да добавяте парчета към него! Това може да направите като изплъзкате неща към плюс симвулът долу. Може да пробвате различни неша! Примерно апликационни стартери или папки. Даже URLs от вашият сайт са възможни... За ръчна и напреднала конфигурация натиснете плюсът.Нямате пайове! Почнете със създаването на пай! Това може да се направи със кликването на малкият плюс символът в долният ляв край.ДействияСетинги за активацияАктивазия опцийВсички икониВсички подъръжани картинни форматиВъншен видПриложенияДържаниеОтметкиБутон %iПоЗентрираноКликнете за да добавите ново парчеКликнете за да изтриетеКликнете за да редактиратеЗатвориКоманда за стартиранеСобствена иконаЗакасненоПокажи найменование на парчетоПокажи панеловата икона Показва името на всяко парче до парчето. Само ако се подържа от темата.Показва главаната ви меню структура.Сигурни ли сте че искате да изтриете избраният пай със всички съхранени парчета вътре?Сигурни ли сте че искате да изтрийте това парче?Плъзнете за да преместитеПуснете за да добавите ново парчеПуснете за да преместите парчетоЕмотиСтартиране на командатаТипове файловеОбщи СетингиГлобална скалаГноум-Пай СетингиГрупа: БукмаркериГрупа: КлипбордГрупа: УзтройстваГрупа: Главно менюГрупа: Контрол на сесиятаГрупа: Прозорецов листКлавишна комбинация за използванеИконна темаАко избрано, Гноум-Пай ще стартира тихо при всяко влизане в системата.Ако избрано, паят ще се затвори когато изберете избраната от вас клавиятурна комбиназия.Ако избрано, паят ще се отвори само ако задържите клавишната комбинация за по дълго.Ако избрано, паят ще се отвори в средата на екранът. Иначе ще се отвори при пойнтерът на мишката.Ако не е избрано, можете да влезете в тожа меню като стартирате Гноум-Пай втори път.Е бързо действиеМожете и копчетата на мишката да програмирате!Старт на апликациаЛяв БутонИзлизанеНатиснете дълго за активиранеГлавно МенюУправлява клипбордът.МаксимизирайСреденБутонМинимизирайДругиМултимедияИме на парчето Нов пайСледвашта песенНяма селектиран пайНе свързаноОтворете паятОтворете пай центриран на екранътОтварете URIОтваря определена локациа. Може да изпозжате URL или файлови пътеки.Отваря нов Гноум-Пай пай. Може да направите под-менюта по този начин.Пай за отварянеМестаПлей/ПаузаНатиснете клавиатурната комбинацияМоля натиснете клавишната комбинацияПредишна ПесенРестартПрейменувайте парчеПрейменувай ме!ВъстановиДесенБутонРутМащабИзберете иконаСесияПоказва парче за Спиране на системата, рестартиране, и зимуване.Показва парче за всеки от директорията Букмарки.Показва парче за всеки от отворените прозорци. Почити като Алт-Таб.Показва парче за всеки от включените узтройства, като USB-стикове.СпиранеСимулира натискането на клавишната комбинациа.Опций за парчетаОпций за парчетоТипове парчетаПускане на Гноум-Пай на логинСприТемиНяма опций за този тип парче.Тази част ще се стартира като кликнете върху паят.Тази клавишна комбинация вече се използва от друг пай "%s"! Моля изберете друга комбиназия или сменете комбиназията.БоклукТурбоТурбо модусURI да се отвориПрозорецGnome-Pie-0.5.4/resources/locale/compile-po.sh000077500000000000000000000001761204074113200211520ustar00rootroot00000000000000#!/bin/bash for d in `ls -d */` do echo -n "$d " msgfmt -c -v $d/LC_MESSAGES/*.po -o $d/LC_MESSAGES/gnomepie.mo done Gnome-Pie-0.5.4/resources/locale/de/000077500000000000000000000000001204074113200171335ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/de/LC_MESSAGES/000077500000000000000000000000001204074113200207205ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/de/LC_MESSAGES/de.po000066400000000000000000000323021204074113200216500ustar00rootroot00000000000000# German translations for gnomepie package. # Copyright (C) 2011 Simon Schneegans # This file is distributed under the same license as the gnomepie package. # Simon Schneegans , 2011. # msgid "" msgstr "" "Project-Id-Version: gnomepie 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-02-29 15:58+0100\n" "PO-Revision-Date: 2011-08-25 21:04+0200\n" "Last-Translator: Simon Schneegans \n" "Language-Team: German\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../../src/actions/keyAction.vala:34 msgid "Press hotkey" msgstr "Tastenkombination" #: ../../src/actions/keyAction.vala:36 msgid "Simulates the activation of a hotkey." msgstr "Simuliert einen Tastendruck." #: ../../src/actions/appAction.vala:34 msgid "Launch application" msgstr "Programm ausführen" #: ../../src/actions/appAction.vala:36 msgid "Executes the given command." msgstr "Führt einen gegebenen Befehl aus." #: ../../src/actions/uriAction.vala:34 msgid "Open URI" msgstr "URI öffnen" #: ../../src/actions/uriAction.vala:36 msgid "Opens a given location. You may use URL's or files paths." msgstr "Öffnet URLs oder Dateipfade." #: ../../src/actions/actionRegistry.vala:119 msgid "Trash" msgstr "Müll" #: ../../src/actions/pieAction.vala:34 msgid "Open Pie" msgstr "Pie öffnen" #: ../../src/actions/pieAction.vala:36 msgid "Opens another Pie of Gnome-Pie. You may create sub menus this way." msgstr "" "Öffnet einen anderen Pie. Auf diese Art können Submenüs erstellt werden." #: ../../src/gui/triggerSelectWindow.vala:166 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/preferencesWindow.vala:175 msgid "No Pie selected." msgstr "Kein Pie gewählt." #: ../../src/gui/preferencesWindow.vala:215 msgid "New Pie" msgstr "Neuer Pie" #: ../../src/gui/preferencesWindow.vala:228 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?" #: ../../src/gui/newSliceWindow.vala:291 msgid "Rename me!" msgstr "Benenne mich!" #: ../../src/gui/piePreviewRenderer.vala:412 msgid "Click to edit" msgstr "Editieren durch klicken" #: ../../src/gui/piePreviewRenderer.vala:412 #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Drag to move" msgstr "Verschieben durch ziehen" #: ../../src/gui/piePreviewRenderer.vala:415 msgid "Click to add a new Slice" msgstr "Neue Slice durch Klicken hinzufügen" #: ../../src/gui/piePreviewRenderer.vala:419 msgid "Drop to add as new Slice" msgstr "Als neue Slice hinzuzufügen" #: ../../src/gui/piePreviewRenderer.vala:422 msgid "Drop to move Slice" msgstr "Slice verschieben" #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Click to delete" msgstr "Löschen durch klicken" #: ../../src/gui/triggerSelectButton.vala:63 msgid "Press a hotkey ..." msgstr "Wählen..." #: ../../src/gui/piePreview.vala:155 msgid "Do you really want to delete this Slice?" msgstr "Soll die ausgewählte Slice wirklich gelöscht werden?" #: ../../src/gui/themeList.vala:62 msgid "Themes" msgstr "Themen" #: ../../src/gui/themeList.vala:99 msgid "By" msgstr "Von" #: ../../src/gui/sliceTypeList.vala:60 msgid "Slice types" msgstr "Slice-Typen" #: ../../src/gui/iconSelectWindow.vala:186 msgid "All icons" msgstr "Alle Symbole" #: ../../src/gui/iconSelectWindow.vala:187 #: ../../src/pies/defaultConfig.vala:36 msgid "Applications" msgstr "Anwendungen" #: ../../src/gui/iconSelectWindow.vala:188 msgid "Actions" msgstr "Aktionen" #: ../../src/gui/iconSelectWindow.vala:189 msgid "Places" msgstr "Orte" #: ../../src/gui/iconSelectWindow.vala:190 msgid "File types" msgstr "Dateitypen" #: ../../src/gui/iconSelectWindow.vala:191 msgid "Emotes" msgstr "Smilies" #: ../../src/gui/iconSelectWindow.vala:192 msgid "Miscellaneous" msgstr "Sonstige" #: ../../src/gui/iconSelectWindow.vala:267 #: ../../src/gui/iconSelectWindow.vala:269 msgid "All supported image formats" msgstr "Alle unterstützten Bildformate" #: ../../src/actionGroups/windowListGroup.vala:34 msgid "Group: Window List" msgstr "Gruppe: Fensterliste" #: ../../src/actionGroups/windowListGroup.vala:36 msgid "Shows a Slice for each of your opened Windows. Almost like Alt-Tab." msgstr "Zeigt eine Slice für jedes geöffnete Fenster an." #: ../../src/actionGroups/menuGroup.vala:35 msgid "Group: Main menu" msgstr "Gruppe: Hauptmenü" #: ../../src/actionGroups/menuGroup.vala:37 msgid "Displays your main menu structure." msgstr "Zeigt das Hauptmenü an." #: ../../src/actionGroups/clipboardGroup.vala:64 msgid "Group: Clipboard" msgstr "Gruppe: Zwischenablage" #: ../../src/actionGroups/clipboardGroup.vala:66 msgid "Manages your Clipboard." msgstr "Verwaltet die Zwischenablage." #: ../../src/actionGroups/sessionGroup.vala:35 msgid "Group: Session Control" msgstr "Gruppe: Sitzung" #: ../../src/actionGroups/sessionGroup.vala:37 msgid "Shows a Slice for Shutdown, Reboot, and Hibernate." msgstr "" "Zeigt eine Slice für Herunterfahren, Neustarten und den Ruhezustand an." #: ../../src/actionGroups/sessionGroup.vala:60 msgid "Shutdown" msgstr "Herunterfahren" #: ../../src/actionGroups/sessionGroup.vala:63 msgid "Logout" msgstr "Ausloggen" #: ../../src/actionGroups/sessionGroup.vala:66 msgid "Reboot" msgstr "Neustarten" #: ../../src/actionGroups/bookmarkGroup.vala:36 msgid "Group: Bookmarks" msgstr "Gruppe: Lesezeichen" #: ../../src/actionGroups/bookmarkGroup.vala:38 msgid "Shows a Slice for each of your directory Bookmarks." msgstr "Zeigt eine Slice für jedes Ordner-Lesezeichen an." #: ../../src/actionGroups/devicesGroup.vala:35 msgid "Group: Devices" msgstr "Gruppe: Laufwerke" #: ../../src/actionGroups/devicesGroup.vala:37 msgid "Shows a Slice for each plugged in devices, like USB-Sticks." msgstr "" "Zeigt eine Slice für jedes angeschlossene Gerät, wie z. B. USB Sticks, an. " #: ../../src/actionGroups/devicesGroup.vala:85 msgid "Root" msgstr "Dateisystem" #: ../../src/utilities/bindingManager.vala:161 ../../src/utilities/key.vala:65 #: ../../src/utilities/trigger.vala:212 ../../src/utilities/trigger.vala:213 msgid "Not bound" msgstr "Nicht zugewiesen" #: ../../src/utilities/trigger.vala:163 msgid "Button %i" msgstr "Taste %i" #: ../../src/utilities/trigger.vala:166 msgid "LeftButton" msgstr "MausLinks" #: ../../src/utilities/trigger.vala:168 msgid "RightButton" msgstr "MausRechts" #: ../../src/utilities/trigger.vala:170 msgid "MiddleButton" msgstr "Mausrad" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:196 msgid "Turbo" msgstr "Turbo" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:192 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:198 msgid "Delayed" msgstr "Verzögert" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:200 msgid "Centered" msgstr "Zentriert" #: ../../src/pies/defaultConfig.vala:29 msgid "Multimedia" msgstr "Multimedia" #: ../../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:45 msgid "Bookmarks" msgstr "Lesezeichen" #: ../../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" #: ../ui/icon_select.ui:8 msgid "Select an icon" msgstr "Wähle ein Symbol" #: ../ui/icon_select.ui:85 msgid "Icon Theme" msgstr "Symbolthema" #: ../ui/icon_select.ui:105 msgid "Custom Icon" msgstr "Benutzerdefiniertes Symbol" #: ../ui/trigger_select.ui:8 msgid "Activation Settings" msgstr "Aktivierungsoptionen" #: ../ui/trigger_select.ui:86 msgid "It's possible to bind mouse buttons as well!" msgstr "Es ist auch möglich, Maustasten zu binden!" #: ../ui/trigger_select.ui:118 msgid "Turbo mode" msgstr "Turbo-Mode" #: ../ui/trigger_select.ui:123 ../ui/trigger_select.ui:124 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." #: ../ui/trigger_select.ui:137 msgid "Long press for activation" msgstr "Verzögerte Aktivierung" #: ../ui/trigger_select.ui:142 ../ui/trigger_select.ui:143 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." #: ../ui/trigger_select.ui:156 msgid "Open Pie centered on the screen" msgstr "Zentriert auf dem Bildschirm öffnen" #: ../ui/trigger_select.ui:161 ../ui/trigger_select.ui:162 msgid "" "If checked, the Pie will open in the middle of your screen. Else it will pop " "up at your pointer." msgstr "" "Falls aktiviert, wird sich der Pie nicht an der Maus, sondern in der Mitte " "des Bildschirms öffnen." #: ../ui/trigger_select.ui:181 msgid "Activation options" msgstr "Aktivierungsoptionen" #: ../ui/settings.ui:9 ../ui/preferences.ui:27 msgid "General Settings" msgstr "Allgemeine Einstellungen" #: ../ui/settings.ui:74 msgid "Start Gnome-Pie on login" msgstr "Beim Anmelden automatisch ausführen" #: ../ui/settings.ui:79 ../ui/settings.ui:80 msgid "If checked, Gnome-Pie will start silently everytime you log in." msgstr "Wenn aktiviert, startet Gnome-Pie im Hintergrund beim Anmelden." #: ../ui/settings.ui:93 msgid "Display panel icon " msgstr "Zeige ein Symbol im Panel" #: ../ui/settings.ui:98 ../ui/settings.ui:99 msgid "" "If not checked, you can access this menu by launching Gnome-Pie a second " "time." msgstr "" "Falls nicht aktiviert, kann dieses Menü durch ein nochmaliges starten von " "Gnome-Pie geöffnet werden." #: ../ui/settings.ui:118 msgid "Behavior" msgstr "Verhalten" #: ../ui/settings.ui:175 msgid "Global scale" msgstr "Skalierungsfaktor" #: ../ui/settings.ui:207 msgid "Display Slice labels" msgstr "Zeige Namen der Slices" #: ../ui/settings.ui:212 ../ui/settings.ui:213 msgid "" "Displays the name of each Slice next to it. Only available if supported by " "the theme." msgstr "" "Zeigt den Name jeder Slice an. Nur möglich, wenn durch das aktuelle Thema " "unterstützt." #: ../ui/settings.ui:232 msgid "Appearance" msgstr "Erscheinungsbild" #: ../ui/slice_select.ui:9 msgid "Slice Options" msgstr "Slice-Optionen" #: ../ui/slice_select.ui:139 msgid "There are no options for this Slice type." msgstr "Es gibt keine Otionen für diesen Slice-Typ." #: ../ui/slice_select.ui:165 msgid "Name of the Slice " msgstr "Name" #: ../ui/slice_select.ui:204 msgid "URI to open" msgstr "URI" #: ../ui/slice_select.ui:243 msgid "Command to execute" msgstr "Befehl" #: ../ui/slice_select.ui:282 msgid "Hotkey to press" msgstr "Tastenkomination" #: ../ui/slice_select.ui:311 msgid "Pie to open" msgstr "Pie" #: ../ui/slice_select.ui:340 msgid "Is Quick Action" msgstr "Ist Quick Action" #: ../ui/slice_select.ui:354 ../ui/slice_select.ui:355 msgid "This Slice will be executed when you click in the middle of the Pie." msgstr "Diese Slice wird aktiviert, falls du in die Mitte des Pies klickst." #: ../ui/slice_select.ui:388 msgid "Slice options" msgstr "Slice-Optionen" #: ../ui/preferences.ui:8 msgid "Gnome-Pie Settings" msgstr "Gnome-Pie - Einstellungen" #: ../ui/preferences.ui:261 msgid "" "This Pie is empty!\n" "\n" "Start adding Slices to it! This can be done by dragging stuff to the " "plus sign below. You can try a lot! For example application launchers or " "folders. Even URLs from your browser are possible... \n" "\n" "For manual and advanced configuration click on the plus sign." msgstr "" "Der Pie ist leer!\n" "\n" "Füge Slices hinzu! Du kannst viele verschieden Dinge zu dem Pluszeichen " "ziehen! Zum Beispiel Anwendungsstarter aus deinem Menü, Dateien oder sogar " "URLs aus dem Browser... \n" "\n" "Zur manuellen und fortgeschrittenen Konfiguration klicke auf das Symbol." #: ../ui/preferences.ui:282 msgid "" "You have no Pies!\n" "\n" "Start by creating one! This can be done by clicking on the tiny little " "plus sign in the lower left corner." msgstr "" "Du hast keine Pies!\n" "\n" "Erstelle einen neuen! Klicke dazu einfach auf das kleine Pluszeichen " "unter der leeren Liste auf der linken Seite." #: ../ui/rename_pie.ui:8 msgid "Rename a Pie" msgstr "Pie umbenennen" Gnome-Pie-0.5.4/resources/locale/de/LC_MESSAGES/gnomepie.mo000066400000000000000000000207221204074113200230630ustar00rootroot00000000000000l|0 (1 Z     $ @ K X a k u x        U "d H (   2 9 U ` q ~        ?CXJ`NH,  5 >K T bm  9B ]i p{    232Cf;%  # 1=V[)bDf8> D O[mb    $ ($2Wn  XH;a6 "$ GRk}  ?)\iac(f+0 D NX p{     $ ?KKi     0 ; GQcHk22M h w   $   , C!Ma!!! !!!]2g0 Vf;Ti1bFdSJE4.RMZ6`8lY%X-h'?(jk953/, ^_)A+U!CNQK\&< [eIc $WG:P=#Da7BH OL"@*> This Pie is empty! Start adding Slices to it! This can be done by dragging stuff to the plus sign below. You can try a lot! For example application launchers or folders. Even URLs from your browser are possible... For manual and advanced configuration click on the plus sign.You have no Pies! Start by creating one! This can be done by clicking on the tiny little plus sign in the lower left corner.ActionsActivation SettingsActivation optionsAll iconsAll supported image formatsAppearanceApplicationsBehaviorBookmarksButton %iByCenteredClick to add a new SliceClick to deleteClick to editCloseCommand to executeCustom IconDelayedDisplay Slice labelsDisplay panel icon Displays the name of each Slice next to it. Only available if supported by the theme.Displays your main menu structure.Do you really want to delete the selected Pie with all contained Slices?Do you really want to delete this Slice?Drag to moveDrop to add as new SliceDrop to move SliceEmotesExecutes the given command.File typesGeneral SettingsGlobal scaleGnome-Pie SettingsGroup: BookmarksGroup: ClipboardGroup: DevicesGroup: Main menuGroup: Session ControlGroup: Window ListHotkey to pressIcon ThemeIf checked, Gnome-Pie will start silently everytime you log in.If checked, the Pie will close when you release the chosen hot key.If checked, the Pie will only open if you press this hot key a bit longer.If checked, the Pie will open in the middle of your screen. Else it will pop up at your pointer.If not checked, you can access this menu by launching Gnome-Pie a second time.Is Quick ActionIt's possible to bind mouse buttons as well!Launch applicationLeftButtonLogoutLong press for activationMain MenuManages your Clipboard.MaximizeMiddleButtonMinimizeMiscellaneousMultimediaName of the Slice New PieNext TrackNo Pie selected.Not boundOpen PieOpen Pie centered on the screenOpen URIOpens a given location. You may use URL's or files paths.Opens another Pie of Gnome-Pie. You may create sub menus this way.Pie to openPlacesPlay/PausePress a hotkey ...Press hotkeyPrevious TrackRebootRename a PieRename me!RestoreRightButtonRootScaleSelect an iconSessionShows a Slice for Shutdown, Reboot, and Hibernate.Shows a Slice for each of your directory Bookmarks.Shows a Slice for each of your opened Windows. Almost like Alt-Tab.Shows a Slice for each plugged in devices, like USB-Sticks.ShutdownSimulates the activation of a hotkey.Slice OptionsSlice optionsSlice typesStart Gnome-Pie on loginStopThemesThere are no options for this Slice type.This Slice will be executed when you click in the middle of the Pie.This hotkey is already assigned to the pie "%s"! Please select another one or cancel your selection.TrashTurboTurbo modeURI to openWindowProject-Id-Version: gnomepie 0.1 Report-Msgid-Bugs-To: POT-Creation-Date: 2012-02-29 15:58+0100 PO-Revision-Date: 2011-08-25 21:04+0200 Last-Translator: Simon Schneegans Language-Team: German Language: de MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); Der Pie ist leer! Füge Slices hinzu! Du kannst viele verschieden Dinge zu dem Pluszeichen ziehen! Zum Beispiel Anwendungsstarter aus deinem Menü, Dateien oder sogar URLs aus dem Browser... Zur manuellen und fortgeschrittenen Konfiguration klicke auf das Symbol.Du hast keine Pies! Erstelle einen neuen! Klicke dazu einfach auf das kleine Pluszeichen unter der leeren Liste auf der linken Seite.AktionenAktivierungsoptionenAktivierungsoptionenAlle SymboleAlle unterstützten BildformateErscheinungsbildAnwendungenVerhaltenLesezeichenTaste %iVonZentriertNeue Slice durch Klicken hinzufügenLöschen durch klickenEditieren durch klickenSchließenBefehlBenutzerdefiniertes SymbolVerzögertZeige Namen der SlicesZeige ein Symbol im PanelZeigt den Name jeder Slice an. Nur möglich, wenn durch das aktuelle Thema unterstützt.Zeigt das Hauptmenü an.Soll dieser Pie wirklich mit allen Slices gelöscht werden?Soll die ausgewählte Slice wirklich gelöscht werden?Verschieben durch ziehenAls neue Slice hinzuzufügenSlice verschiebenSmiliesFührt einen gegebenen Befehl aus.DateitypenAllgemeine EinstellungenSkalierungsfaktorGnome-Pie - EinstellungenGruppe: LesezeichenGruppe: ZwischenablageGruppe: LaufwerkeGruppe: HauptmenüGruppe: SitzungGruppe: FensterlisteTastenkominationSymbolthemaWenn aktiviert, startet Gnome-Pie im Hintergrund beim Anmelden.Falls aktiviert schließt sich der Pie wieder automatisch, wenn der Hotkey losgelassen wird.Falls aktiviert, wird sich der Pie erst öffnen, wenn der Hotkey länger gedrückt gehalten wird.Falls aktiviert, wird sich der Pie nicht an der Maus, sondern in der Mitte des Bildschirms öffnen.Falls nicht aktiviert, kann dieses Menü durch ein nochmaliges starten von Gnome-Pie geöffnet werden.Ist Quick ActionEs ist auch möglich, Maustasten zu binden!Programm ausführenMausLinksAusloggenVerzögerte AktivierungHauptmenüVerwaltet die Zwischenablage.MaximierenMausradMinimierenSonstigeMultimediaNameNeuer PieNächster TitelKein Pie gewählt.Nicht zugewiesenPie öffnenZentriert auf dem Bildschirm öffnenURI öffnenÖffnet URLs oder Dateipfade.Öffnet einen anderen Pie. Auf diese Art können Submenüs erstellt werden.PieOrtePlay/PauseWählen...TastenkombinationVorheriger TitelNeustartenPie umbenennenBenenne mich!WiederherstellenMausRechtsDateisystemSkalierenWähle ein SymbolSitzungZeigt eine Slice für Herunterfahren, Neustarten und den Ruhezustand an.Zeigt eine Slice für jedes Ordner-Lesezeichen an.Zeigt eine Slice für jedes geöffnete Fenster an.Zeigt eine Slice für jedes angeschlossene Gerät, wie z. B. USB Sticks, an. HerunterfahrenSimuliert einen Tastendruck.Slice-OptionenSlice-OptionenSlice-TypenBeim Anmelden automatisch ausführenStoppThemenEs gibt keine Otionen für diesen Slice-Typ.Diese Slice wird aktiviert, falls du in die Mitte des Pies klickst.Dieser Hotkey ist schon dem Pie "%s" zugeordnet! Bitte wähle einen anderen!MüllTurboTurbo-ModeURIFensterGnome-Pie-0.5.4/resources/locale/es/000077500000000000000000000000001204074113200171525ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/es/LC_MESSAGES/000077500000000000000000000000001204074113200207375ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/es/LC_MESSAGES/es.po000066400000000000000000000327211204074113200217130ustar00rootroot00000000000000# Spanish translations for gnomepie package. # Copyright (C) 2012 Simon Schneegans # This file is distributed under the same license as the gnomepie package. # Eduardo Anabalon , 2012. # msgid "" msgstr "" "Project-Id-Version: gnomepie 0.4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-02-29 15:58+0100\n" "PO-Revision-Date: 2012-01-22 15:30-0300\n" "Last-Translator: Eduardo Anabalon \n" "Language-Team: Spanish\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../../src/actions/keyAction.vala:34 msgid "Press hotkey" msgstr "Presiona un atajo." #: ../../src/actions/keyAction.vala:36 msgid "Simulates the activation of a hotkey." msgstr "Simula la activación de un atajo." #: ../../src/actions/appAction.vala:34 msgid "Launch application" msgstr "Lanzar una aplicación" #: ../../src/actions/appAction.vala:36 msgid "Executes the given command." msgstr "Ejecutar un comando dado." #: ../../src/actions/uriAction.vala:34 msgid "Open URI" msgstr "Abrir URI" #: ../../src/actions/uriAction.vala:36 msgid "Opens a given location. You may use URL's or files paths." msgstr "Abre un lugar determinado. Puedes usar URI's o ruta de archivos." #: ../../src/actions/actionRegistry.vala:119 msgid "Trash" msgstr "Borrar" #: ../../src/actions/pieAction.vala:34 msgid "Open Pie" msgstr "Abrir Pastel" #: ../../src/actions/pieAction.vala:36 msgid "Opens another Pie of Gnome-Pie. You may create sub menus this way." msgstr "Abre otro Pastel de Gnome-Pie. De esta manera puedes crear submenús." #: ../../src/gui/triggerSelectWindow.vala:166 msgid "" "This hotkey is already assigned to the pie \"%s\"! \n" "\n" "Please select another one or cancel your selection." msgstr "" "Este atajo ya está asignado al pastel \"%s\"! \n" "\n" "Por favor selecciona otro atajo o cancela tu selección." #: ../../src/gui/preferencesWindow.vala:175 msgid "No Pie selected." msgstr "Pastel no seleccionado." #: ../../src/gui/preferencesWindow.vala:215 msgid "New Pie" msgstr "Nuevo Pastel" #: ../../src/gui/preferencesWindow.vala:228 msgid "" "Do you really want to delete the selected Pie with all contained Slices?" msgstr "" "Realmente quieres borrar el Pastel seleccionado incluyendo todas sus " "Rebanadas?" #: ../../src/gui/newSliceWindow.vala:291 msgid "Rename me!" msgstr "Renombrame!" #: ../../src/gui/piePreviewRenderer.vala:412 msgid "Click to edit" msgstr "Click para editar" #: ../../src/gui/piePreviewRenderer.vala:412 #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Drag to move" msgstr "Arrastra para mover" #: ../../src/gui/piePreviewRenderer.vala:415 msgid "Click to add a new Slice" msgstr "Click para añadir una nueva Rebanada" #: ../../src/gui/piePreviewRenderer.vala:419 msgid "Drop to add as new Slice" msgstr "Suelta para añadir una nueva Rebanada" #: ../../src/gui/piePreviewRenderer.vala:422 msgid "Drop to move Slice" msgstr "Suelta para mover la Rebanada" #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Click to delete" msgstr "Click para borrar" #: ../../src/gui/triggerSelectButton.vala:63 msgid "Press a hotkey ..." msgstr "Presiona un atajo ..." #: ../../src/gui/piePreview.vala:155 msgid "Do you really want to delete this Slice?" msgstr "Realmente quieres borrar ésta Rebanada?" #: ../../src/gui/themeList.vala:62 msgid "Themes" msgstr "Temas" #: ../../src/gui/themeList.vala:99 msgid "By" msgstr "Por" #: ../../src/gui/sliceTypeList.vala:60 msgid "Slice types" msgstr "Tipos de Rebanada" #: ../../src/gui/iconSelectWindow.vala:186 msgid "All icons" msgstr "Todos los iconos" #: ../../src/gui/iconSelectWindow.vala:187 #: ../../src/pies/defaultConfig.vala:36 msgid "Applications" msgstr "Aplicaciones" #: ../../src/gui/iconSelectWindow.vala:188 msgid "Actions" msgstr "Acciones" #: ../../src/gui/iconSelectWindow.vala:189 msgid "Places" msgstr "Lugares" #: ../../src/gui/iconSelectWindow.vala:190 msgid "File types" msgstr "Tipos de archivo" #: ../../src/gui/iconSelectWindow.vala:191 msgid "Emotes" msgstr "Emotes" #: ../../src/gui/iconSelectWindow.vala:192 msgid "Miscellaneous" msgstr "Misceláneos" #: ../../src/gui/iconSelectWindow.vala:267 #: ../../src/gui/iconSelectWindow.vala:269 msgid "All supported image formats" msgstr "Todos los formatos de imágenes soportados" #: ../../src/actionGroups/windowListGroup.vala:34 msgid "Group: Window List" msgstr "Grupo: Lista de Ventanas" #: ../../src/actionGroups/windowListGroup.vala:36 msgid "Shows a Slice for each of your opened Windows. Almost like Alt-Tab." msgstr "" "Muestra una Rebanada para cada uno de tus Ventanas abiertas. Casi como Alt-" "Tab." #: ../../src/actionGroups/menuGroup.vala:35 msgid "Group: Main menu" msgstr "Grupo: Menú Principal" #: ../../src/actionGroups/menuGroup.vala:37 msgid "Displays your main menu structure." msgstr "Muestra la estructura de tu Menú Principal." #: ../../src/actionGroups/clipboardGroup.vala:64 msgid "Group: Clipboard" msgstr "Grupo: Portapapeles" #: ../../src/actionGroups/clipboardGroup.vala:66 msgid "Manages your Clipboard." msgstr "Gestiona tus Portapapeles." #: ../../src/actionGroups/sessionGroup.vala:35 msgid "Group: Session Control" msgstr "Grupo: Control de Sesión" #: ../../src/actionGroups/sessionGroup.vala:37 msgid "Shows a Slice for Shutdown, Reboot, and Hibernate." msgstr "Muestra una Rebanada para Apagar, Reiniciar, e Hibernar." #: ../../src/actionGroups/sessionGroup.vala:60 msgid "Shutdown" msgstr "Apagar" #: ../../src/actionGroups/sessionGroup.vala:63 msgid "Logout" msgstr "Cerrar Sesión" #: ../../src/actionGroups/sessionGroup.vala:66 msgid "Reboot" msgstr "Reiniciar" #: ../../src/actionGroups/bookmarkGroup.vala:36 msgid "Group: Bookmarks" msgstr "Grupo: Marcadores" #: ../../src/actionGroups/bookmarkGroup.vala:38 msgid "Shows a Slice for each of your directory Bookmarks." msgstr "Muestra una Rebanada por cada uno de los directorios en los Marcadores." #: ../../src/actionGroups/devicesGroup.vala:35 msgid "Group: Devices" msgstr "Grupo: Dispositivos" #: ../../src/actionGroups/devicesGroup.vala:37 msgid "Shows a Slice for each plugged in devices, like USB-Sticks." msgstr "Muestra una Rebanada por cada dispositivo conectado, como USB-Sticks." #: ../../src/actionGroups/devicesGroup.vala:85 msgid "Root" msgstr "Root" #: ../../src/utilities/bindingManager.vala:161 ../../src/utilities/key.vala:65 #: ../../src/utilities/trigger.vala:212 ../../src/utilities/trigger.vala:213 msgid "Not bound" msgstr "No encontrado" #: ../../src/utilities/trigger.vala:163 msgid "Button %i" msgstr "Botón %i" #: ../../src/utilities/trigger.vala:166 msgid "LeftButton" msgstr "BotónIzquierdo" #: ../../src/utilities/trigger.vala:168 msgid "RightButton" msgstr "BotónDerecho" #: ../../src/utilities/trigger.vala:170 msgid "MiddleButton" msgstr "BotónCentral" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:196 msgid "Turbo" msgstr "Turbo" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:192 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:198 msgid "Delayed" msgstr "Retrasado" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:200 msgid "Centered" msgstr "Centrado" #: ../../src/pies/defaultConfig.vala:29 msgid "Multimedia" msgstr "Multimedia" #: ../../src/pies/defaultConfig.vala:30 msgid "Next Track" msgstr "Pista Siguiente" #: ../../src/pies/defaultConfig.vala:31 msgid "Stop" msgstr "Parar" #: ../../src/pies/defaultConfig.vala:32 msgid "Previous Track" msgstr "Pista Anterior" #: ../../src/pies/defaultConfig.vala:33 msgid "Play/Pause" msgstr "Reproducir/Pausa" #: ../../src/pies/defaultConfig.vala:45 msgid "Bookmarks" msgstr "Marcadores" #: ../../src/pies/defaultConfig.vala:50 msgid "Session" msgstr "Sesión" #: ../../src/pies/defaultConfig.vala:54 msgid "Main Menu" msgstr "Menú Principal" #: ../../src/pies/defaultConfig.vala:58 msgid "Window" msgstr "Ventana" #: ../../src/pies/defaultConfig.vala:59 msgid "Scale" msgstr "Escalar" #: ../../src/pies/defaultConfig.vala:60 msgid "Minimize" msgstr "Minimizar" #: ../../src/pies/defaultConfig.vala:61 msgid "Close" msgstr "Cerrar" #: ../../src/pies/defaultConfig.vala:62 msgid "Maximize" msgstr "Maximizar" #: ../../src/pies/defaultConfig.vala:63 msgid "Restore" msgstr "Restaurar" #: ../ui/icon_select.ui:8 msgid "Select an icon" msgstr "Selecciona un icono" #: ../ui/icon_select.ui:85 msgid "Icon Theme" msgstr "Tema de iconos" #: ../ui/icon_select.ui:105 msgid "Custom Icon" msgstr "Icono personalizado" #: ../ui/trigger_select.ui:8 msgid "Activation Settings" msgstr "Configuración de activación" #: ../ui/trigger_select.ui:86 msgid "It's possible to bind mouse buttons as well!" msgstr "Es posible enlazar los botones del ratón también!" #: ../ui/trigger_select.ui:118 msgid "Turbo mode" msgstr "Modo Turbo" #: ../ui/trigger_select.ui:123 ../ui/trigger_select.ui:124 msgid "If checked, the Pie will close when you release the chosen hot key." msgstr "el Pastel cerrará cuando sueltes el atajo seleccionado." #: ../ui/trigger_select.ui:137 msgid "Long press for activation" msgstr "Larga pulsación para la activación" #: ../ui/trigger_select.ui:142 ../ui/trigger_select.ui:143 msgid "" "If checked, the Pie will only open if you press this hot key a bit longer." msgstr "el Pastel solo se abrirá si presionas el atajo un poco más." #: ../ui/trigger_select.ui:156 msgid "Open Pie centered on the screen" msgstr "Abrir el Pastel en el centro de la pantalla" #: ../ui/trigger_select.ui:161 ../ui/trigger_select.ui:162 msgid "" "If checked, the Pie will open in the middle of your screen. Else it will pop " "up at your pointer." msgstr "" "el Pastel abrirá en el centro de la pantalla. De lo contrario abrirá encima " "del puntero." #: ../ui/trigger_select.ui:181 msgid "Activation options" msgstr "Opciones de activación" #: ../ui/settings.ui:9 ../ui/preferences.ui:27 msgid "General Settings" msgstr "Configuraciones Generales" #: ../ui/settings.ui:74 msgid "Start Gnome-Pie on login" msgstr "Arrancar Gnome-Pie al inicio" #: ../ui/settings.ui:79 ../ui/settings.ui:80 msgid "If checked, Gnome-Pie will start silently everytime you log in." msgstr "Gnome-Pie se iniciará en silencio cada vez que inicies sesión." #: ../ui/settings.ui:93 msgid "Display panel icon " msgstr "Mostrar panel de íconos" #: ../ui/settings.ui:98 ../ui/settings.ui:99 msgid "" "If not checked, you can access this menu by launching Gnome-Pie a second " "time." msgstr "Si no esta activado, puedes acceder a este menú lanzando Gnome-Pie " "por segunda vez." #: ../ui/settings.ui:118 msgid "Behavior" msgstr "Comportamiento" #: ../ui/settings.ui:175 msgid "Global scale" msgstr "Escala Global" #: ../ui/settings.ui:207 #, fuzzy msgid "Display Slice labels" msgstr "Mostrar las etiquetas de las Rebanadas" #: ../ui/settings.ui:212 ../ui/settings.ui:213 msgid "" "Displays the name of each Slice next to it. Only available if supported by " "the theme." msgstr "" "Mostrar el nombre de cada Rebanada. Solo si es soportado por el theme." #: ../ui/settings.ui:232 #, fuzzy msgid "Appearance" msgstr "Apariencia" #: ../ui/slice_select.ui:9 msgid "Slice Options" msgstr "Opciones de Rebanadas" #: ../ui/slice_select.ui:139 msgid "There are no options for this Slice type." msgstr "No hay opciones para este tipo de Rebanada." #: ../ui/slice_select.ui:165 msgid "Name of the Slice " msgstr "Nombre de la Rebanada " #: ../ui/slice_select.ui:204 msgid "URI to open" msgstr "URI a abrir" #: ../ui/slice_select.ui:243 msgid "Command to execute" msgstr "Comando a ejecutar" #: ../ui/slice_select.ui:282 msgid "Hotkey to press" msgstr "Atajo a presionar" #: ../ui/slice_select.ui:311 msgid "Pie to open" msgstr "Pastel a abrir" #: ../ui/slice_select.ui:340 msgid "Is Quick Action" msgstr "Es una Acción Rápida" #: ../ui/slice_select.ui:354 ../ui/slice_select.ui:355 msgid "This Slice will be executed when you click in the middle of the Pie." msgstr "Esta Rebanada se ejecutará cuando hagas click en el medio del Pastel." #: ../ui/slice_select.ui:388 msgid "Slice options" msgstr "Opciones de Rebanadas" #: ../ui/preferences.ui:8 msgid "Gnome-Pie Settings" msgstr "Configuraciones de Gnome-Pie" #: ../ui/preferences.ui:261 msgid "" "This Pie is empty!\n" "\n" "Start adding Slices to it! This can be done by dragging stuff to the " "plus sign below. You can try a lot! For example application launchers or " "folders. Even URLs from your browser are possible... \n" "\n" "For manual and advanced configuration click on the plus sign." msgstr "" "Un Pastel vacío!\n" "\n" "Empieza añadiendo Rebanadas! Puedes hacerlo añadiendo cosas al signo " "más. Puedes intentar muchas cosas! Por ejemplo lanzadores de aplicaciones o " "directorios. Incluso puedes añadir URLs desde tu navegador... \n" "\n" "Para configuración manual y avanzada, click en el signo más." #: ../ui/preferences.ui:282 msgid "" "You have no Pies!\n" "\n" "Start by creating one! This can be done by clicking on the tiny little " "plus sign in the lower left corner." msgstr "" "No tienes Pasteles!\n" "\n" "Empieza por crear uno! Puedes hacerlo haciendo click en el pequeño " "signo más en la esquina inferior izquierda." #: ../ui/rename_pie.ui:8 msgid "Rename a Pie" msgstr "Renombrar un Pastel" #~ msgid "Suspend" #~ msgstr "Suspender" #~ msgid "Hibernate" #~ msgstr "Hibernar" Gnome-Pie-0.5.4/resources/locale/es/LC_MESSAGES/gnomepie.mo000066400000000000000000000210451204074113200231010ustar00rootroot00000000000000jl ( :     - 6 @ J M V o      U "$ HG (       1 > Q b s     ? CJ\`NW,g      "-@ HS dnw9B ) 0; N[j q ~ 23C&;j%   )"DLf  i"8^g*    %=Oah{ F,O&(v&* DRo@8U=ZT'|3$"2 M W e o |   + @$Ee  ) 5 ?MRZn8vGOEG  "     !!+!FJ!g!!" " ""[0e. Td9Rg/`DbQHC2,PKX4^6jW#V+f%=&hi731-*\]'?)SALOIZ$: YcGa "UE8N;!B_5 FMJ @>(< This Pie is empty! Start adding Slices to it! This can be done by dragging stuff to the plus sign below. You can try a lot! For example application launchers or folders. Even URLs from your browser are possible... For manual and advanced configuration click on the plus sign.You have no Pies! Start by creating one! This can be done by clicking on the tiny little plus sign in the lower left corner.ActionsActivation SettingsActivation optionsAll iconsAll supported image formatsApplicationsBehaviorBookmarksButton %iByCenteredClick to add a new SliceClick to deleteClick to editCloseCommand to executeCustom IconDelayedDisplay panel icon Displays the name of each Slice next to it. Only available if supported by the theme.Displays your main menu structure.Do you really want to delete the selected Pie with all contained Slices?Do you really want to delete this Slice?Drag to moveDrop to add as new SliceDrop to move SliceEmotesExecutes the given command.File typesGeneral SettingsGlobal scaleGnome-Pie SettingsGroup: BookmarksGroup: ClipboardGroup: DevicesGroup: Main menuGroup: Session ControlGroup: Window ListHotkey to pressIcon ThemeIf checked, Gnome-Pie will start silently everytime you log in.If checked, the Pie will close when you release the chosen hot key.If checked, the Pie will only open if you press this hot key a bit longer.If checked, the Pie will open in the middle of your screen. Else it will pop up at your pointer.If not checked, you can access this menu by launching Gnome-Pie a second time.Is Quick ActionIt's possible to bind mouse buttons as well!Launch applicationLeftButtonLogoutLong press for activationMain MenuManages your Clipboard.MaximizeMiddleButtonMinimizeMiscellaneousMultimediaName of the Slice New PieNext TrackNo Pie selected.Not boundOpen PieOpen Pie centered on the screenOpen URIOpens a given location. You may use URL's or files paths.Opens another Pie of Gnome-Pie. You may create sub menus this way.Pie to openPlacesPlay/PausePress a hotkey ...Press hotkeyPrevious TrackRebootRename a PieRename me!RestoreRightButtonRootScaleSelect an iconSessionShows a Slice for Shutdown, Reboot, and Hibernate.Shows a Slice for each of your directory Bookmarks.Shows a Slice for each of your opened Windows. Almost like Alt-Tab.Shows a Slice for each plugged in devices, like USB-Sticks.ShutdownSimulates the activation of a hotkey.Slice OptionsSlice optionsSlice typesStart Gnome-Pie on loginStopThemesThere are no options for this Slice type.This Slice will be executed when you click in the middle of the Pie.This hotkey is already assigned to the pie "%s"! Please select another one or cancel your selection.TrashTurboTurbo modeURI to openWindowProject-Id-Version: gnomepie 0.4 Report-Msgid-Bugs-To: POT-Creation-Date: 2012-02-29 15:58+0100 PO-Revision-Date: 2012-01-22 15:30-0300 Last-Translator: Eduardo Anabalon Language-Team: Spanish Language: es MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); Un Pastel vacío! Empieza añadiendo Rebanadas! Puedes hacerlo añadiendo cosas al signo más. Puedes intentar muchas cosas! Por ejemplo lanzadores de aplicaciones o directorios. Incluso puedes añadir URLs desde tu navegador... Para configuración manual y avanzada, click en el signo más.No tienes Pasteles! Empieza por crear uno! Puedes hacerlo haciendo click en el pequeño signo más en la esquina inferior izquierda.AccionesConfiguración de activaciónOpciones de activaciónTodos los iconosTodos los formatos de imágenes soportadosAplicacionesComportamientoMarcadoresBotón %iPorCentradoClick para añadir una nueva RebanadaClick para borrarClick para editarCerrarComando a ejecutarIcono personalizadoRetrasadoMostrar panel de íconosMostrar el nombre de cada Rebanada. Solo si es soportado por el theme.Muestra la estructura de tu Menú Principal.Realmente quieres borrar el Pastel seleccionado incluyendo todas sus Rebanadas?Realmente quieres borrar ésta Rebanada?Arrastra para moverSuelta para añadir una nueva RebanadaSuelta para mover la RebanadaEmotesEjecutar un comando dado.Tipos de archivoConfiguraciones GeneralesEscala GlobalConfiguraciones de Gnome-PieGrupo: MarcadoresGrupo: PortapapelesGrupo: DispositivosGrupo: Menú PrincipalGrupo: Control de SesiónGrupo: Lista de VentanasAtajo a presionarTema de iconosGnome-Pie se iniciará en silencio cada vez que inicies sesión.el Pastel cerrará cuando sueltes el atajo seleccionado.el Pastel solo se abrirá si presionas el atajo un poco más.el Pastel abrirá en el centro de la pantalla. De lo contrario abrirá encima del puntero.Si no esta activado, puedes acceder a este menú lanzando Gnome-Pie por segunda vez.Es una Acción RápidaEs posible enlazar los botones del ratón también!Lanzar una aplicaciónBotónIzquierdoCerrar SesiónLarga pulsación para la activaciónMenú PrincipalGestiona tus Portapapeles.MaximizarBotónCentralMinimizarMisceláneosMultimediaNombre de la Rebanada Nuevo PastelPista SiguientePastel no seleccionado.No encontradoAbrir PastelAbrir el Pastel en el centro de la pantallaAbrir URIAbre un lugar determinado. Puedes usar URI's o ruta de archivos.Abre otro Pastel de Gnome-Pie. De esta manera puedes crear submenús.Pastel a abrirLugaresReproducir/PausaPresiona un atajo ...Presiona un atajo.Pista AnteriorReiniciarRenombrar un PastelRenombrame!RestaurarBotónDerechoRootEscalarSelecciona un iconoSesiónMuestra una Rebanada para Apagar, Reiniciar, e Hibernar.Muestra una Rebanada por cada uno de los directorios en los Marcadores.Muestra una Rebanada para cada uno de tus Ventanas abiertas. Casi como Alt-Tab.Muestra una Rebanada por cada dispositivo conectado, como USB-Sticks.ApagarSimula la activación de un atajo.Opciones de RebanadasOpciones de RebanadasTipos de RebanadaArrancar Gnome-Pie al inicioPararTemasNo hay opciones para este tipo de Rebanada.Esta Rebanada se ejecutará cuando hagas click en el medio del Pastel.Este atajo ya está asignado al pastel "%s"! Por favor selecciona otro atajo o cancela tu selección.BorrarTurboModo TurboURI a abrirVentanaGnome-Pie-0.5.4/resources/locale/fr/000077500000000000000000000000001204074113200171525ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/fr/LC_MESSAGES/000077500000000000000000000000001204074113200207375ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/fr/LC_MESSAGES/fr.po000066400000000000000000000342571204074113200217210ustar00rootroot00000000000000# French translations for gnomepie package # Traductions françaises du paquet gnomepie. # Copyright (C) 2012 Simon Schneegans # This file is distributed under the same license as the gnomepie package. # Grégoire BELLON-GERVAIS , 2012. # Alex Maxime , 2012. # Mathilde Simeon 2012. # msgid "" msgstr "" "Project-Id-Version: gnomepie 0.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-05-15 20:14+0200\n" "PO-Revision-Date: 2012-05-15 22:41+0100\n" "Last-Translator: mathilde simeon \n" "Language-Team: French\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: ../../src/gui/iconSelectWindow.vala:186 msgid "All icons" msgstr "Toutes les icônes" #: ../../src/gui/iconSelectWindow.vala:187 #: ../../src/pies/defaultConfig.vala:36 msgid "Applications" msgstr "Applications" #: ../../src/gui/iconSelectWindow.vala:188 msgid "Actions" msgstr "Actions" #: ../../src/gui/iconSelectWindow.vala:189 msgid "Places" msgstr "Dossiers" #: ../../src/gui/iconSelectWindow.vala:190 msgid "File types" msgstr "Types de fichiers" #: ../../src/gui/iconSelectWindow.vala:191 msgid "Emotes" msgstr "Émoticones" #: ../../src/gui/iconSelectWindow.vala:192 msgid "Miscellaneous" msgstr "Divers" #: ../../src/gui/iconSelectWindow.vala:267 #: ../../src/gui/iconSelectWindow.vala:269 msgid "All supported image formats" msgstr "Tous les formats d'images supportés" #: ../../src/gui/triggerSelectButton.vala:63 msgid "Press a hotkey ..." msgstr "Faites un raccourci clavier" #: ../../src/gui/themeList.vala:62 msgid "Themes" msgstr "Thèmes" #: ../../src/gui/themeList.vala:99 msgid "By" msgstr "Par" #: ../../src/gui/piePreviewRenderer.vala:412 msgid "Click to edit" msgstr "Cliquez pour éditer" #: ../../src/gui/piePreviewRenderer.vala:412 #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Drag to move" msgstr "Faites glisser pour déplacer" #: ../../src/gui/piePreviewRenderer.vala:415 msgid "Click to add a new Slice" msgstr "" "Cliquez pour ajouter \n" " une nouvelle Part" #: ../../src/gui/piePreviewRenderer.vala:419 msgid "Drop to add as new Slice" msgstr "" "Déposez pour ajouter \n" " une nouvelle Part" #: ../../src/gui/piePreviewRenderer.vala:422 msgid "Drop to move Slice" msgstr "" "Déposez pour \n" " déplacer la Part" #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Click to delete" msgstr "Cliquez pour supprimer" #: ../../src/gui/newSliceWindow.vala:291 msgid "Rename me!" msgstr "Renommez-moi!" #: ../../src/gui/piePreview.vala:152 msgid "Do you really want to delete this Slice?" msgstr "Voulez-vous supprimer cette Part ?" #: ../../src/gui/triggerSelectWindow.vala:166 msgid "" "This hotkey is already assigned to the pie \"%s\"! \n" "\n" "Please select another one or cancel your selection." msgstr "" "Ce raccourci clavier est déja défini pour la Tarte \"%s\"! \n" "\n" "Merci d'en choisir un autre ou d'annuler votre choix." #: ../../src/gui/sliceTypeList.vala:60 msgid "Slice types" msgstr "Types de Part" #: ../../src/gui/preferencesWindow.vala:175 msgid "No Pie selected." msgstr "Aucune Tarte sélectionnée" #: ../../src/gui/preferencesWindow.vala:215 msgid "New Pie" msgstr "Nouvelle Tarte" #: ../../src/gui/preferencesWindow.vala:228 msgid "Do you really want to delete the selected Pie with all contained Slices?" msgstr "Voulez-vous supprimer la Tarte sélectionnée et son contenu ?" #: ../../src/utilities/trigger.vala:163 msgid "Button %i" msgstr "Bouton %i" #: ../../src/utilities/trigger.vala:166 msgid "LeftButton" msgstr "Bouton Gauche" #: ../../src/utilities/trigger.vala:168 msgid "RightButton" msgstr "Bouton Droit" #: ../../src/utilities/trigger.vala:170 msgid "MiddleButton" msgstr "Bouton Central" #: ../../src/utilities/trigger.vala:188 #: ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:192 #: ../../src/utilities/trigger.vala:196 msgid "Turbo" msgstr "Turbo" #: ../../src/utilities/trigger.vala:188 #: ../../src/utilities/trigger.vala:192 #: ../../src/utilities/trigger.vala:194 #: ../../src/utilities/trigger.vala:198 msgid "Delayed" msgstr "Différé" #: ../../src/utilities/trigger.vala:188 #: ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:194 #: ../../src/utilities/trigger.vala:200 msgid "Centered" msgstr "Centré" #: ../../src/utilities/trigger.vala:212 #: ../../src/utilities/trigger.vala:213 #: ../../src/utilities/bindingManager.vala:161 #: ../../src/utilities/key.vala:65 msgid "Not bound" msgstr "Aucun raccourci" #: ../../src/actions/appAction.vala:34 msgid "Launch application" msgstr "Lancer l'application" #: ../../src/actions/appAction.vala:36 msgid "Executes the given command." msgstr "Exécute la commande définie" #: ../../src/actions/uriAction.vala:34 msgid "Open URI" msgstr "Ouvrir une URL" #: ../../src/actions/uriAction.vala:36 msgid "Opens a given location. You may use URL's or files paths." msgstr "Ouvre un emplacement défini. Vous pouvez utiliser une URL ou un emplacementde fichier" #: ../../src/actions/pieAction.vala:34 msgid "Open Pie" msgstr "Ouvrir une Tarte" #: ../../src/actions/pieAction.vala:36 msgid "Opens another Pie of Gnome-Pie. You may create sub menus this way." msgstr "Ouvre une autre Part de Tarte. Vous pouvez ainsi créer des sous-menus." #: ../../src/actions/actionRegistry.vala:119 msgid "Trash" msgstr "Poubelle" #: ../../src/actions/keyAction.vala:34 msgid "Press hotkey" msgstr "Appuyez sur le raccourci clavier" #: ../../src/actions/keyAction.vala:36 msgid "Simulates the activation of a hotkey." msgstr "Simule l'activation d'un raccourci clavier" #: ../../src/pies/defaultConfig.vala:29 msgid "Multimedia" msgstr "Multimédia" #: ../../src/pies/defaultConfig.vala:30 msgid "Next Track" msgstr "Piste suivante" #: ../../src/pies/defaultConfig.vala:31 msgid "Stop" msgstr "Stop" #: ../../src/pies/defaultConfig.vala:32 msgid "Previous Track" msgstr "Piste précédente" #: ../../src/pies/defaultConfig.vala:33 msgid "Play/Pause" msgstr "Lecture/Pause" #: ../../src/pies/defaultConfig.vala:45 msgid "Bookmarks" msgstr "Favoris" #: ../../src/pies/defaultConfig.vala:50 msgid "Session" msgstr "Session" #: ../../src/pies/defaultConfig.vala:54 msgid "Main Menu" msgstr "Menu Principal" #: ../../src/pies/defaultConfig.vala:58 msgid "Window" msgstr "Fenêtre" #: ../../src/pies/defaultConfig.vala:59 msgid "Scale" msgstr "Échelle" #: ../../src/pies/defaultConfig.vala:60 msgid "Minimize" msgstr "Minimiser" #: ../../src/pies/defaultConfig.vala:61 msgid "Close" msgstr "Fermer" #: ../../src/pies/defaultConfig.vala:62 msgid "Maximize" msgstr "Agrandir" #: ../../src/pies/defaultConfig.vala:63 msgid "Restore" msgstr "Restaurer" #: ../../src/actionGroups/menuGroup.vala:35 msgid "Group: Main menu" msgstr "Groupe : Menu principal" #: ../../src/actionGroups/menuGroup.vala:37 msgid "Displays your main menu structure." msgstr "Affiche la structure du menu principal" #: ../../src/actionGroups/windowListGroup.vala:34 msgid "Group: Window List" msgstr "Groupe : Liste de fenêtres" #: ../../src/actionGroups/windowListGroup.vala:36 msgid "Shows a Slice for each of your opened Windows. Almost like Alt-Tab." msgstr "Affiche une Part pour chacune des fenêtres ouvertes. Fonctionne comme Alt-Tab." #: ../../src/actionGroups/sessionGroup.vala:35 msgid "Group: Session Control" msgstr "Groupe : Gestion de la Session" #: ../../src/actionGroups/sessionGroup.vala:37 msgid "Shows a Slice for Shutdown, Reboot, and Hibernate." msgstr "Affiche une Part pour Éteindre, Redémarrer, et Hiberner" #: ../../src/actionGroups/sessionGroup.vala:60 msgid "Shutdown" msgstr "Éteindre" #: ../../src/actionGroups/sessionGroup.vala:63 msgid "Logout" msgstr "Déconnexion" #: ../../src/actionGroups/sessionGroup.vala:66 msgid "Reboot" msgstr "Redémarrer" #: ../../src/actionGroups/clipboardGroup.vala:64 msgid "Group: Clipboard" msgstr "Groupe : Presse-papier" #: ../../src/actionGroups/clipboardGroup.vala:66 msgid "Manages your Clipboard." msgstr "Gère votre Presse-papier" #: ../../src/actionGroups/devicesGroup.vala:35 msgid "Group: Devices" msgstr "Groupe : Périphériques" #: ../../src/actionGroups/devicesGroup.vala:37 msgid "Shows a Slice for each plugged in devices, like USB-Sticks." msgstr "Affiche une Part pour chaque périphérique branché, par exemple une clé USB" #: ../../src/actionGroups/devicesGroup.vala:85 msgid "Root" msgstr "Racine" #: ../../src/actionGroups/bookmarkGroup.vala:36 msgid "Group: Bookmarks" msgstr "Groupe : Favoris" #: ../../src/actionGroups/bookmarkGroup.vala:38 msgid "Shows a Slice for each of your directory Bookmarks." msgstr "Affiche une Part pour chacun des répertoires en Favoris" #: ../ui/rename_pie.ui:8 msgid "Rename a Pie" msgstr "Renommer la Tarte" #: ../ui/settings.ui:9 #: ../ui/preferences.ui:27 msgid "General Settings" msgstr "Paramètres généraux" #: ../ui/settings.ui:74 msgid "Start Gnome-Pie on login" msgstr "Lancer Gnome-Pie au démarrage" #: ../ui/settings.ui:79 #: ../ui/settings.ui:80 msgid "If checked, Gnome-Pie will start silently everytime you log in." msgstr "Si coché, Gnome-Pie se lancera à chaque connexion" #: ../ui/settings.ui:93 msgid "Display panel icon " msgstr "Affiche l'icône dans la zone de notification " #: ../ui/settings.ui:98 #: ../ui/settings.ui:99 msgid "If not checked, you can access this menu by launching Gnome-Pie a second time." msgstr "Si non coché, vous pouvez accéder à ce menu en lançant Gnome-Pie une seconde fois " #: ../ui/settings.ui:118 msgid "Behavior" msgstr "Comportement" #: ../ui/settings.ui:175 msgid "Global scale" msgstr "Échelle globale" #: ../ui/settings.ui:207 msgid "Display Slice labels" msgstr "Afficher le nom des Parts" #: ../ui/settings.ui:212 #: ../ui/settings.ui:213 msgid "Displays the name of each Slice next to it. Only available if supported by the theme." msgstr "" "Afficher le nom à côté de chaque Part.\n" "(disponbile uniquement pour les thèmes compatibles)" #: ../ui/settings.ui:232 msgid "Appearance" msgstr "Apparence" #: ../ui/icon_select.ui:8 msgid "Select an icon" msgstr "Choisir une icône" #: ../ui/icon_select.ui:85 msgid "Icon Theme" msgstr "Thème d'icônes" #: ../ui/icon_select.ui:105 msgid "Custom Icon" msgstr "Icône personnalisée" #: ../ui/slice_select.ui:9 msgid "Slice Options" msgstr "Options de la Part" #: ../ui/slice_select.ui:139 msgid "There are no options for this Slice type." msgstr "Il n'y a pas d'options pour ce type de Part" #: ../ui/slice_select.ui:165 msgid "Name of the Slice " msgstr "Nom de la Part" #: ../ui/slice_select.ui:204 msgid "URI to open" msgstr "Liens web à ouvrir" #: ../ui/slice_select.ui:243 msgid "Command to execute" msgstr "Commande à exécuter" #: ../ui/slice_select.ui:282 msgid "Hotkey to press" msgstr "Raccourci clavier à effectuer" #: ../ui/slice_select.ui:311 msgid "Pie to open" msgstr "Tarte à ouvrir" #: ../ui/slice_select.ui:340 msgid "Is Quick Action" msgstr "Action rapide" #: ../ui/slice_select.ui:354 #: ../ui/slice_select.ui:355 msgid "This Slice will be executed when you click in the middle of the Pie." msgstr "Cette Part sera exécutée quand vous cliquerez au milieu de la Tarte." #: ../ui/slice_select.ui:388 msgid "Slice options" msgstr "Options de la Part" #: ../ui/preferences.ui:8 msgid "Gnome-Pie Settings" msgstr "Paramètres de Gnome-Pie" #: ../ui/preferences.ui:261 msgid "" "This Pie is empty!\n" "\n" "Start adding Slices to it! This can be done by dragging stuff to the plus sign below. You can try a lot! For example application launchers or folders. Even URLs from your browser are possible... \n" "\n" "For manual and advanced configuration click on the plus sign." msgstr "" "Cette Tarte est vide !\n" "\n" "Commencez par lui ajouter des Parts !\n" "Pour cela, vous pouvez déplacer des éléments sur le signe plus. Vous pouvez essayer plein de choses ! Par exemple, des lanceurs d'application ou des dossiers. Même les liens de votre navigateur sont supportés...\n" "\n" "Pour un ajout manuel ou avancé, cliquez sur le signe plus." #: ../ui/preferences.ui:282 msgid "" "You have no Pies!\n" "\n" "Start by creating one! This can be done by clicking on the tiny little plus sign in the lower left corner." msgstr "" "Vous n'avez aucune Tarte !\n" "\n" "Commencez par en créer une ! Vous pouvez le faire en cliquant sur le petit signe plus dans le coin en bas à gauche." #: ../ui/trigger_select.ui:8 msgid "Activation Settings" msgstr "Paramètres d'activation" #: ../ui/trigger_select.ui:86 msgid "It's possible to bind mouse buttons as well!" msgstr "Il est également possible d'assigner des boutons de souris !" #: ../ui/trigger_select.ui:118 msgid "Turbo mode" msgstr "Mode Turbo" #: ../ui/trigger_select.ui:123 #: ../ui/trigger_select.ui:124 msgid "If checked, the Pie will close when you release the chosen hot key." msgstr "Si coché, la Tarte se ferme quand vous relâchez le raccourci clavier" #: ../ui/trigger_select.ui:137 msgid "Long press for activation" msgstr "Appui prolongé pour activer" #: ../ui/trigger_select.ui:142 #: ../ui/trigger_select.ui:143 msgid "If checked, the Pie will only open if you press this hot key a bit longer." msgstr "Si coché, la Tarte s'ouvrira seulement si vous maintenez le raccourci clavier" #: ../ui/trigger_select.ui:156 msgid "Open Pie centered on the screen" msgstr "Ouvrir la Tarte au centre de l'écran" #: ../ui/trigger_select.ui:161 #: ../ui/trigger_select.ui:162 msgid "If checked, the Pie will open in the middle of your screen. Else it will pop up at your pointer." msgstr "Si coché, la Tarte s'ouvrira au centre de l'écran. Sinon elle apparaîtra sous la souris" #: ../ui/trigger_select.ui:181 msgid "Activation options" msgstr "Options d'activation" Gnome-Pie-0.5.4/resources/locale/fr/LC_MESSAGES/gnomepie.mo000066400000000000000000000215111204074113200230770ustar00rootroot00000000000000l|0 (1 Z     $ @ K X a k u x        U "d H (   2 9 U ` q ~        ?CXJ`NH,  5 >K T bm  9B ]i p{    232Cf;%  # 1=V[)bDf8> D O[dbe-$ ? I Vc kuy( .-^\&>"!D)b! +<Sl3F#NjZV k=y  -6 EO Vbq%VGX    # 5 C M Z a j } 9 8 O NH! !*!!! !""$"+,"FX"r"## !#,#@#]2g0 Vf;Ti1bFdSJE4.RMZ6`8lY%X-h'?(jk953/, ^_)A+U!CNQK\&< [eIc $WG:P=#Da7BH OL"@*> This Pie is empty! Start adding Slices to it! This can be done by dragging stuff to the plus sign below. You can try a lot! For example application launchers or folders. Even URLs from your browser are possible... For manual and advanced configuration click on the plus sign.You have no Pies! Start by creating one! This can be done by clicking on the tiny little plus sign in the lower left corner.ActionsActivation SettingsActivation optionsAll iconsAll supported image formatsAppearanceApplicationsBehaviorBookmarksButton %iByCenteredClick to add a new SliceClick to deleteClick to editCloseCommand to executeCustom IconDelayedDisplay Slice labelsDisplay panel icon Displays the name of each Slice next to it. Only available if supported by the theme.Displays your main menu structure.Do you really want to delete the selected Pie with all contained Slices?Do you really want to delete this Slice?Drag to moveDrop to add as new SliceDrop to move SliceEmotesExecutes the given command.File typesGeneral SettingsGlobal scaleGnome-Pie SettingsGroup: BookmarksGroup: ClipboardGroup: DevicesGroup: Main menuGroup: Session ControlGroup: Window ListHotkey to pressIcon ThemeIf checked, Gnome-Pie will start silently everytime you log in.If checked, the Pie will close when you release the chosen hot key.If checked, the Pie will only open if you press this hot key a bit longer.If checked, the Pie will open in the middle of your screen. Else it will pop up at your pointer.If not checked, you can access this menu by launching Gnome-Pie a second time.Is Quick ActionIt's possible to bind mouse buttons as well!Launch applicationLeftButtonLogoutLong press for activationMain MenuManages your Clipboard.MaximizeMiddleButtonMinimizeMiscellaneousMultimediaName of the Slice New PieNext TrackNo Pie selected.Not boundOpen PieOpen Pie centered on the screenOpen URIOpens a given location. You may use URL's or files paths.Opens another Pie of Gnome-Pie. You may create sub menus this way.Pie to openPlacesPlay/PausePress a hotkey ...Press hotkeyPrevious TrackRebootRename a PieRename me!RestoreRightButtonRootScaleSelect an iconSessionShows a Slice for Shutdown, Reboot, and Hibernate.Shows a Slice for each of your directory Bookmarks.Shows a Slice for each of your opened Windows. Almost like Alt-Tab.Shows a Slice for each plugged in devices, like USB-Sticks.ShutdownSimulates the activation of a hotkey.Slice OptionsSlice optionsSlice typesStart Gnome-Pie on loginStopThemesThere are no options for this Slice type.This Slice will be executed when you click in the middle of the Pie.This hotkey is already assigned to the pie "%s"! Please select another one or cancel your selection.TrashTurboTurbo modeURI to openWindowProject-Id-Version: gnomepie 0.5 Report-Msgid-Bugs-To: POT-Creation-Date: 2012-05-15 20:14+0200 PO-Revision-Date: 2012-05-15 22:41+0100 Last-Translator: mathilde simeon Language-Team: French Language: fr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n > 1); Cette Tarte est vide ! Commencez par lui ajouter des Parts ! Pour cela, vous pouvez déplacer des éléments sur le signe plus. Vous pouvez essayer plein de choses ! Par exemple, des lanceurs d'application ou des dossiers. Même les liens de votre navigateur sont supportés... Pour un ajout manuel ou avancé, cliquez sur le signe plus.Vous n'avez aucune Tarte ! Commencez par en créer une ! Vous pouvez le faire en cliquant sur le petit signe plus dans le coin en bas à gauche.ActionsParamètres d'activationOptions d'activationToutes les icônesTous les formats d'images supportésApparenceApplicationsComportementFavorisBouton %iParCentréCliquez pour ajouter une nouvelle PartCliquez pour supprimerCliquez pour éditerFermerCommande à exécuterIcône personnaliséeDifféréAfficher le nom des PartsAffiche l'icône dans la zone de notification Afficher le nom à côté de chaque Part. (disponbile uniquement pour les thèmes compatibles)Affiche la structure du menu principalVoulez-vous supprimer la Tarte sélectionnée et son contenu ?Voulez-vous supprimer cette Part ?Faites glisser pour déplacerDéposez pour ajouter une nouvelle PartDéposez pour déplacer la PartÉmoticonesExécute la commande définieTypes de fichiersParamètres générauxÉchelle globaleParamètres de Gnome-PieGroupe : FavorisGroupe : Presse-papierGroupe : PériphériquesGroupe : Menu principalGroupe : Gestion de la SessionGroupe : Liste de fenêtresRaccourci clavier à effectuerThème d'icônesSi coché, Gnome-Pie se lancera à chaque connexionSi coché, la Tarte se ferme quand vous relâchez le raccourci clavierSi coché, la Tarte s'ouvrira seulement si vous maintenez le raccourci clavierSi coché, la Tarte s'ouvrira au centre de l'écran. Sinon elle apparaîtra sous la sourisSi non coché, vous pouvez accéder à ce menu en lançant Gnome-Pie une seconde fois Action rapideIl est également possible d'assigner des boutons de souris !Lancer l'applicationBouton GaucheDéconnexionAppui prolongé pour activerMenu PrincipalGère votre Presse-papierAgrandirBouton CentralMinimiserDiversMultimédiaNom de la PartNouvelle TartePiste suivanteAucune Tarte sélectionnéeAucun raccourciOuvrir une TarteOuvrir la Tarte au centre de l'écranOuvrir une URLOuvre un emplacement défini. Vous pouvez utiliser une URL ou un emplacementde fichierOuvre une autre Part de Tarte. Vous pouvez ainsi créer des sous-menus.Tarte à ouvrirDossiersLecture/PauseFaites un raccourci clavierAppuyez sur le raccourci clavierPiste précédenteRedémarrerRenommer la TarteRenommez-moi!RestaurerBouton DroitRacineÉchelleChoisir une icôneSessionAffiche une Part pour Éteindre, Redémarrer, et HibernerAffiche une Part pour chacun des répertoires en FavorisAffiche une Part pour chacune des fenêtres ouvertes. Fonctionne comme Alt-Tab.Affiche une Part pour chaque périphérique branché, par exemple une clé USBÉteindreSimule l'activation d'un raccourci clavierOptions de la PartOptions de la PartTypes de PartLancer Gnome-Pie au démarrageStopThèmesIl n'y a pas d'options pour ce type de PartCette Part sera exécutée quand vous cliquerez au milieu de la Tarte.Ce raccourci clavier est déja défini pour la Tarte "%s"! Merci d'en choisir un autre ou d'annuler votre choix.PoubelleTurboMode TurboLiens web à ouvrirFenêtreGnome-Pie-0.5.4/resources/locale/gen-po.sh000077500000000000000000000004011204074113200202620ustar00rootroot00000000000000#!/bin/bash echo "Insert your locale:"; read locale; if [ "$locale" == "" ] then echo "No locale inserted! Aborting..."; exit 1 fi mkdir -p $locale/LC_MESSAGES msginit --locale=$locale --input=gnomepie.pot --output=$locale/LC_MESSAGES/$locale.po Gnome-Pie-0.5.4/resources/locale/gen-pot.sh000077500000000000000000000017741204074113200204640ustar00rootroot00000000000000#!/bin/bash # Searches trough all vala files of Gnome-Pie and generates # a gnomepie.pot for strings which need to be translated. domain="gnomepie" version="0.4" copyright="Simon Schneegans " filelist=$( find ../ui/ -name '*.ui' -printf "%h/%f " ) xgettext --package-name $domain \ --package-version $version \ --default-domain $domain \ --output $domain.pot.tmp \ --copyright-holder="$copyright" \ --from-code utf-8 \ -k_ \ -L Glade \ $filelist filelist=$( find ../../src/ -name '*.vala' -printf "%h/%f " ) xgettext --package-name $domain \ --package-version $version \ --default-domain $domain \ --output $domain.pot \ --copyright-holder="$copyright" \ --from-code utf-8 \ -k_ \ -L C# \ $filelist awk 'NR>18' $domain.pot.tmp >> $domain.pot sed --in-place $domain.pot --expression='s/CHARSET/UTF-8/' rm $domain.pot.tmp Gnome-Pie-0.5.4/resources/locale/gnomepie.pot000066400000000000000000000241721204074113200211000ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Simon Schneegans # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: gnomepie 0.4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-02-29 16:07-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../src/actions/keyAction.vala:34 msgid "Press hotkey" msgstr "" #: ../../src/actions/keyAction.vala:36 msgid "Simulates the activation of a hotkey." msgstr "" #: ../../src/actions/pieAction.vala:34 msgid "Open Pie" msgstr "" #: ../../src/actions/pieAction.vala:36 msgid "Opens another Pie of Gnome-Pie. You may create sub menus this way." msgstr "" #: ../../src/actions/appAction.vala:34 msgid "Launch application" msgstr "" #: ../../src/actions/appAction.vala:36 msgid "Executes the given command." msgstr "" #: ../../src/actions/uriAction.vala:34 msgid "Open URI" msgstr "" #: ../../src/actions/uriAction.vala:36 msgid "Opens a given location. You may use URL's or files paths." msgstr "" #: ../../src/actions/actionRegistry.vala:119 msgid "Trash" msgstr "" #: ../../src/utilities/trigger.vala:163 msgid "Button %i" msgstr "" #: ../../src/utilities/trigger.vala:166 msgid "LeftButton" msgstr "" #: ../../src/utilities/trigger.vala:168 msgid "RightButton" msgstr "" #: ../../src/utilities/trigger.vala:170 msgid "MiddleButton" msgstr "" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:196 msgid "Turbo" msgstr "" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:192 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:198 msgid "Delayed" msgstr "" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:200 msgid "Centered" msgstr "" #: ../../src/utilities/trigger.vala:212 ../../src/utilities/trigger.vala:213 #: ../../src/utilities/key.vala:65 ../../src/utilities/bindingManager.vala:161 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:187 msgid "Applications" msgstr "" #: ../../src/pies/defaultConfig.vala:45 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/piePreview.vala:155 msgid "Do you really want to delete this Slice?" msgstr "" #: ../../src/gui/themeList.vala:62 msgid "Themes" msgstr "" #: ../../src/gui/themeList.vala:99 msgid "By" msgstr "" #: ../../src/gui/newSliceWindow.vala:291 msgid "Rename me!" msgstr "" #: ../../src/gui/triggerSelectWindow.vala:166 msgid "" "This hotkey is already assigned to the pie \"%s\"! \n" "\n" "Please select another one or cancel your selection." msgstr "" #: ../../src/gui/piePreviewRenderer.vala:412 msgid "Click to edit" msgstr "" #: ../../src/gui/piePreviewRenderer.vala:412 #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Drag to move" msgstr "" #: ../../src/gui/piePreviewRenderer.vala:415 msgid "Click to add a new Slice" msgstr "" #: ../../src/gui/piePreviewRenderer.vala:419 msgid "Drop to add as new Slice" msgstr "" #: ../../src/gui/piePreviewRenderer.vala:422 msgid "Drop to move Slice" msgstr "" #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Click to delete" msgstr "" #: ../../src/gui/preferencesWindow.vala:175 msgid "No Pie selected." msgstr "" #: ../../src/gui/preferencesWindow.vala:215 msgid "New Pie" msgstr "" #: ../../src/gui/preferencesWindow.vala:228 msgid "" "Do you really want to delete the selected Pie with all contained Slices?" msgstr "" #: ../../src/gui/triggerSelectButton.vala:63 msgid "Press a hotkey ..." msgstr "" #: ../../src/gui/sliceTypeList.vala:60 msgid "Slice types" msgstr "" #: ../../src/gui/iconSelectWindow.vala:186 msgid "All icons" msgstr "" #: ../../src/gui/iconSelectWindow.vala:188 msgid "Actions" msgstr "" #: ../../src/gui/iconSelectWindow.vala:189 msgid "Places" msgstr "" #: ../../src/gui/iconSelectWindow.vala:190 msgid "File types" msgstr "" #: ../../src/gui/iconSelectWindow.vala:191 msgid "Emotes" msgstr "" #: ../../src/gui/iconSelectWindow.vala:192 msgid "Miscellaneous" msgstr "" #: ../../src/gui/iconSelectWindow.vala:267 #: ../../src/gui/iconSelectWindow.vala:269 msgid "All supported image formats" msgstr "" #: ../../src/actionGroups/windowListGroup.vala:34 msgid "Group: Window List" msgstr "" #: ../../src/actionGroups/windowListGroup.vala:36 msgid "Shows a Slice for each of your opened Windows. Almost like Alt-Tab." msgstr "" #: ../../src/actionGroups/devicesGroup.vala:35 msgid "Group: Devices" msgstr "" #: ../../src/actionGroups/devicesGroup.vala:37 msgid "Shows a Slice for each plugged in devices, like USB-Sticks." msgstr "" #: ../../src/actionGroups/devicesGroup.vala:85 msgid "Root" msgstr "" #: ../../src/actionGroups/bookmarkGroup.vala:36 msgid "Group: Bookmarks" msgstr "" #: ../../src/actionGroups/bookmarkGroup.vala:38 msgid "Shows a Slice for each of your directory Bookmarks." msgstr "" #: ../../src/actionGroups/sessionGroup.vala:35 msgid "Group: Session Control" msgstr "" #: ../../src/actionGroups/sessionGroup.vala:37 msgid "Shows a Slice for Shutdown, Reboot, and Hibernate." msgstr "" #: ../../src/actionGroups/sessionGroup.vala:60 msgid "Shutdown" msgstr "" #: ../../src/actionGroups/sessionGroup.vala:63 msgid "Logout" msgstr "" #: ../../src/actionGroups/sessionGroup.vala:66 msgid "Reboot" msgstr "" #: ../../src/actionGroups/menuGroup.vala:35 msgid "Group: Main menu" msgstr "" #: ../../src/actionGroups/menuGroup.vala:37 msgid "Displays your main menu structure." msgstr "" #: ../../src/actionGroups/clipboardGroup.vala:64 msgid "Group: Clipboard" msgstr "" #: ../../src/actionGroups/clipboardGroup.vala:66 msgid "Manages your Clipboard." msgstr "" #: ../ui/icon_select.ui:8 msgid "Select an icon" msgstr "" #: ../ui/icon_select.ui:85 msgid "Icon Theme" msgstr "" #: ../ui/icon_select.ui:105 msgid "Custom Icon" msgstr "" #: ../ui/rename_pie.ui:8 msgid "Rename a Pie" msgstr "" #: ../ui/preferences.ui:8 msgid "Gnome-Pie Settings" msgstr "" #: ../ui/preferences.ui:27 ../ui/settings.ui:9 msgid "General Settings" msgstr "" #: ../ui/preferences.ui:261 msgid "" "This Pie is empty!\n" "\n" "Start adding Slices to it! This can be done by dragging stuff to the " "plus sign below. You can try a lot! For example application launchers or " "folders. Even URLs from your browser are possible... \n" "\n" "For manual and advanced configuration click on the plus sign." msgstr "" #: ../ui/preferences.ui:282 msgid "" "You have no Pies!\n" "\n" "Start by creating one! This can be done by clicking on the tiny little " "plus sign in the lower left corner." msgstr "" #: ../ui/slice_select.ui:9 msgid "Slice Options" msgstr "" #: ../ui/slice_select.ui:139 msgid "There are no options for this Slice type." msgstr "" #: ../ui/slice_select.ui:165 msgid "Name of the Slice " msgstr "" #: ../ui/slice_select.ui:204 msgid "URI to open" msgstr "" #: ../ui/slice_select.ui:243 msgid "Command to execute" msgstr "" #: ../ui/slice_select.ui:282 msgid "Hotkey to press" msgstr "" #: ../ui/slice_select.ui:311 msgid "Pie to open" msgstr "" #: ../ui/slice_select.ui:340 msgid "Is Quick Action" msgstr "" #: ../ui/slice_select.ui:354 ../ui/slice_select.ui:355 msgid "This Slice will be executed when you click in the middle of the Pie." msgstr "" #: ../ui/slice_select.ui:388 msgid "Slice options" msgstr "" #: ../ui/settings.ui:74 msgid "Start Gnome-Pie on login" msgstr "" #: ../ui/settings.ui:79 ../ui/settings.ui:80 msgid "If checked, Gnome-Pie will start silently everytime you log in." msgstr "" #: ../ui/settings.ui:93 msgid "Display panel icon " msgstr "" #: ../ui/settings.ui:98 ../ui/settings.ui:99 msgid "" "If not checked, you can access this menu by launching Gnome-Pie a second " "time." msgstr "" #: ../ui/settings.ui:118 msgid "Behavior" msgstr "" #: ../ui/settings.ui:175 msgid "Global scale" msgstr "" #: ../ui/settings.ui:207 msgid "Display Slice labels" msgstr "" #: ../ui/settings.ui:212 ../ui/settings.ui:213 msgid "" "Displays the name of each Slice next to it. Only available if supported by " "the theme." msgstr "" #: ../ui/settings.ui:232 msgid "Appearance" msgstr "" #: ../ui/trigger_select.ui:8 msgid "Activation Settings" msgstr "" #: ../ui/trigger_select.ui:86 msgid "It's possible to bind mouse buttons as well!" msgstr "" #: ../ui/trigger_select.ui:118 msgid "Turbo mode" msgstr "" #: ../ui/trigger_select.ui:123 ../ui/trigger_select.ui:124 msgid "If checked, the Pie will close when you release the chosen hot key." msgstr "" #: ../ui/trigger_select.ui:137 msgid "Long press for activation" msgstr "" #: ../ui/trigger_select.ui:142 ../ui/trigger_select.ui:143 msgid "" "If checked, the Pie will only open if you press this hot key a bit longer." msgstr "" #: ../ui/trigger_select.ui:156 msgid "Open Pie centered on the screen" msgstr "" #: ../ui/trigger_select.ui:161 ../ui/trigger_select.ui:162 msgid "" "If checked, the Pie will open in the middle of your screen. Else it will pop " "up at your pointer." msgstr "" #: ../ui/trigger_select.ui:181 msgid "Activation options" msgstr "" Gnome-Pie-0.5.4/resources/locale/it/000077500000000000000000000000001204074113200171575ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/it/LC_MESSAGES/000077500000000000000000000000001204074113200207445ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/it/LC_MESSAGES/gnomepie.mo000066400000000000000000000062301204074113200231050ustar00rootroot000000000000001C,89 AK gt }  H  C JN      " -7@I P [hw~ f!' -8?#    ' 0 7 L JV X f |   &      ' : H W ` g w        q y   ) /#(& !-%'0*+ $ 1, ".ActionsAll iconsAll supported image formatsApplicationsBehaviorBookmarksButton %iCloseCustom IconDelayedDo you really want to delete the selected Pie with all contained Slices?File typesIcon ThemeIf checked, the Pie will close when you release the chosen hot key.If checked, the Pie will only open if you press this hot key a bit longer.Launch applicationLeftButtonLogoutLong press for activationMain MenuMaximizeMiddleButtonMinimizeMiscellaneousMultimediaNew PieNext TrackNot boundOpen PieOpen URIPlacesPlay/PausePress hotkeyPrevious TrackRebootRestoreRightButtonRootScaleSessionShutdownStopThemesThis hotkey is already assigned to the pie "%s"! Please select another one or cancel your selection.TrashTurboTurbo modeWindowProject-Id-Version: gnomepie 0.1 Report-Msgid-Bugs-To: POT-Creation-Date: 2012-02-29 15:58+0100 PO-Revision-Date: 2011-11-09 12:52+0100 Last-Translator: Riccardo Traverso Language-Team: Italian Language: it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); X-Poedit-Language: Italian AzioniTutte le iconeTutti i formati immagine supportatiApplicazioniComportamentoSegnalibriTasto %iChiudiIcona personalizzataRitardatoVuoi davvero eliminare la Torta selezionata e tutte le Fette che contiene?Tipi di fileTema di iconeSe selezionato, la Torta si chiuderà al rilascio della combinazione di tasti assegnata.Se selezionato, la Torta si aprirà soltanto se si preme la combinazione di tasti un po' più a lungo.Lancia applicazioneTasto sinistroChiudi sessionePressione prolungata per l'attivazioneMenu principaleMassimizzaTasto centraleMinimizzaVarieMultimediaNuova TortaTraccia SuccessivaNon assegnatoApri una TortaApri URILuoghiRiproduci/PausaPressione di tastiTraccia PrecedenteRiavvioRipristinaTasto destroRootScalaSessioneSpegnimentoFermaTemiQuesta combinazione di tasti è stata già assegnata alla Torta "%s"! Selezionane un'altra oppure annulla la tua selezione per favore.CestinoTurboModalità turboFinestraGnome-Pie-0.5.4/resources/locale/it/LC_MESSAGES/it.po000066400000000000000000000411141204074113200217210ustar00rootroot00000000000000# Italian translations for gnomepie package. # Copyright (C) 2011 Simon Schneegans # This file is distributed under the same license as the gnomepie package. # Riccardo Traverso , 2011. # msgid "" msgstr "" "Project-Id-Version: gnomepie 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-02-29 15:58+0100\n" "PO-Revision-Date: 2011-11-09 12:52+0100\n" "Last-Translator: Riccardo Traverso \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/actions/keyAction.vala:34 msgid "Press hotkey" msgstr "Pressione di tasti" #: ../../src/actions/keyAction.vala:36 msgid "Simulates the activation of a hotkey." msgstr "" #: ../../src/actions/appAction.vala:34 msgid "Launch application" msgstr "Lancia applicazione" #: ../../src/actions/appAction.vala:36 msgid "Executes the given command." msgstr "" #: ../../src/actions/uriAction.vala:34 msgid "Open URI" msgstr "Apri URI" #: ../../src/actions/uriAction.vala:36 msgid "Opens a given location. You may use URL's or files paths." msgstr "" #: ../../src/actions/actionRegistry.vala:119 msgid "Trash" msgstr "Cestino" #: ../../src/actions/pieAction.vala:34 msgid "Open Pie" msgstr "Apri una Torta" #: ../../src/actions/pieAction.vala:36 msgid "Opens another Pie of Gnome-Pie. You may create sub menus this way." msgstr "" #: ../../src/gui/triggerSelectWindow.vala:166 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/preferencesWindow.vala:175 msgid "No Pie selected." msgstr "" #: ../../src/gui/preferencesWindow.vala:215 msgid "New Pie" msgstr "Nuova Torta" #: ../../src/gui/preferencesWindow.vala:228 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/newSliceWindow.vala:291 msgid "Rename me!" msgstr "" #: ../../src/gui/piePreviewRenderer.vala:412 msgid "Click to edit" msgstr "" #: ../../src/gui/piePreviewRenderer.vala:412 #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Drag to move" msgstr "" #: ../../src/gui/piePreviewRenderer.vala:415 #, fuzzy msgid "Click to add a new Slice" msgstr "Aggiungi nuova Fetta" #: ../../src/gui/piePreviewRenderer.vala:419 #, fuzzy msgid "Drop to add as new Slice" msgstr "Aggiungi nuova Fetta" #: ../../src/gui/piePreviewRenderer.vala:422 msgid "Drop to move Slice" msgstr "" #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Click to delete" msgstr "" #: ../../src/gui/triggerSelectButton.vala:63 #, fuzzy msgid "Press a hotkey ..." msgstr "Pressione di tasti" #: ../../src/gui/piePreview.vala:155 #, fuzzy msgid "Do you really want to delete this Slice?" msgstr "Vuoi davvero eliminare la Fetta selezionata?" #: ../../src/gui/themeList.vala:62 msgid "Themes" msgstr "Temi" #: ../../src/gui/themeList.vala:99 msgid "By" msgstr "" #: ../../src/gui/sliceTypeList.vala:60 #, fuzzy msgid "Slice types" msgstr "Tipi di file" #: ../../src/gui/iconSelectWindow.vala:186 msgid "All icons" msgstr "Tutte le icone" #: ../../src/gui/iconSelectWindow.vala:187 #: ../../src/pies/defaultConfig.vala:36 msgid "Applications" msgstr "Applicazioni" #: ../../src/gui/iconSelectWindow.vala:188 msgid "Actions" msgstr "Azioni" #: ../../src/gui/iconSelectWindow.vala:189 msgid "Places" msgstr "Luoghi" #: ../../src/gui/iconSelectWindow.vala:190 msgid "File types" msgstr "Tipi di file" #: ../../src/gui/iconSelectWindow.vala:191 msgid "Emotes" msgstr "" #: ../../src/gui/iconSelectWindow.vala:192 msgid "Miscellaneous" msgstr "Varie" #: ../../src/gui/iconSelectWindow.vala:267 #: ../../src/gui/iconSelectWindow.vala:269 msgid "All supported image formats" msgstr "Tutti i formati immagine supportati" #: ../../src/actionGroups/windowListGroup.vala:34 #, fuzzy msgid "Group: Window List" msgstr "Elenco delle finestre" #: ../../src/actionGroups/windowListGroup.vala:36 msgid "Shows a Slice for each of your opened Windows. Almost like Alt-Tab." msgstr "" #: ../../src/actionGroups/menuGroup.vala:35 #, fuzzy msgid "Group: Main menu" msgstr "Menu principale" #: ../../src/actionGroups/menuGroup.vala:37 msgid "Displays your main menu structure." msgstr "" #: ../../src/actionGroups/clipboardGroup.vala:64 #, fuzzy msgid "Group: Clipboard" msgstr "Appunti" #: ../../src/actionGroups/clipboardGroup.vala:66 msgid "Manages your Clipboard." msgstr "" #: ../../src/actionGroups/sessionGroup.vala:35 #, fuzzy msgid "Group: Session Control" msgstr "Controllo della sessione" #: ../../src/actionGroups/sessionGroup.vala:37 msgid "Shows a Slice for Shutdown, Reboot, and Hibernate." msgstr "" #: ../../src/actionGroups/sessionGroup.vala:60 msgid "Shutdown" msgstr "Spegnimento" #: ../../src/actionGroups/sessionGroup.vala:63 msgid "Logout" msgstr "Chiudi sessione" #: ../../src/actionGroups/sessionGroup.vala:66 msgid "Reboot" msgstr "Riavvio" #: ../../src/actionGroups/bookmarkGroup.vala:36 #, fuzzy msgid "Group: Bookmarks" msgstr "Segnalibri" #: ../../src/actionGroups/bookmarkGroup.vala:38 msgid "Shows a Slice for each of your directory Bookmarks." msgstr "" #: ../../src/actionGroups/devicesGroup.vala:35 #, fuzzy msgid "Group: Devices" msgstr "Dispositivi" #: ../../src/actionGroups/devicesGroup.vala:37 msgid "Shows a Slice for each plugged in devices, like USB-Sticks." msgstr "" #: ../../src/actionGroups/devicesGroup.vala:85 msgid "Root" msgstr "Root" #: ../../src/utilities/bindingManager.vala:161 ../../src/utilities/key.vala:65 #: ../../src/utilities/trigger.vala:212 ../../src/utilities/trigger.vala:213 msgid "Not bound" msgstr "Non assegnato" #: ../../src/utilities/trigger.vala:163 msgid "Button %i" msgstr "Tasto %i" #: ../../src/utilities/trigger.vala:166 msgid "LeftButton" msgstr "Tasto sinistro" #: ../../src/utilities/trigger.vala:168 msgid "RightButton" msgstr "Tasto destro" #: ../../src/utilities/trigger.vala:170 msgid "MiddleButton" msgstr "Tasto centrale" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:196 msgid "Turbo" msgstr "Turbo" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:192 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:198 msgid "Delayed" msgstr "Ritardato" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:200 msgid "Centered" msgstr "" #: ../../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:45 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" #: ../ui/icon_select.ui:8 msgid "Select an icon" msgstr "" #: ../ui/icon_select.ui:85 msgid "Icon Theme" msgstr "Tema di icone" #: ../ui/icon_select.ui:105 msgid "Custom Icon" msgstr "Icona personalizzata" #: ../ui/trigger_select.ui:8 msgid "Activation Settings" msgstr "" #: ../ui/trigger_select.ui:86 msgid "It's possible to bind mouse buttons as well!" msgstr "" #: ../ui/trigger_select.ui:118 msgid "Turbo mode" msgstr "Modalità turbo" #: ../ui/trigger_select.ui:123 ../ui/trigger_select.ui:124 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." #: ../ui/trigger_select.ui:137 msgid "Long press for activation" msgstr "Pressione prolungata per l'attivazione" #: ../ui/trigger_select.ui:142 ../ui/trigger_select.ui:143 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." #: ../ui/trigger_select.ui:156 msgid "Open Pie centered on the screen" msgstr "" #: ../ui/trigger_select.ui:161 ../ui/trigger_select.ui:162 #, fuzzy msgid "" "If checked, the Pie will open in the middle of your screen. Else it will pop " "up at your pointer." msgstr "" "Se selezionato, la Torta si aprirà soltanto se si preme la combinazione di " "tasti un po' più a lungo." #: ../ui/trigger_select.ui:181 msgid "Activation options" msgstr "" #: ../ui/settings.ui:9 ../ui/preferences.ui:27 #, fuzzy msgid "General Settings" msgstr "Gnome-Pie - Impostazioni" #: ../ui/settings.ui:74 #, fuzzy msgid "Start Gnome-Pie on login" msgstr "Avvia al Login" #: ../ui/settings.ui:79 ../ui/settings.ui:80 #, fuzzy msgid "If checked, Gnome-Pie will start silently everytime you log in." msgstr "Se selezionato, Gnome-Pie si avvierà all'accesso." #: ../ui/settings.ui:93 msgid "Display panel icon " msgstr "" #: ../ui/settings.ui:98 ../ui/settings.ui:99 msgid "" "If not checked, you can access this menu by launching Gnome-Pie a second " "time." msgstr "" #: ../ui/settings.ui:118 msgid "Behavior" msgstr "Comportamento" #: ../ui/settings.ui:175 #, fuzzy msgid "Global scale" msgstr "Scala globale" #: ../ui/settings.ui:207 msgid "Display Slice labels" msgstr "" #: ../ui/settings.ui:212 ../ui/settings.ui:213 msgid "" "Displays the name of each Slice next to it. Only available if supported by " "the theme." msgstr "" #: ../ui/settings.ui:232 msgid "Appearance" msgstr "" #: ../ui/slice_select.ui:9 #, fuzzy msgid "Slice Options" msgstr "Applicazioni" #: ../ui/slice_select.ui:139 msgid "There are no options for this Slice type." msgstr "" #: ../ui/slice_select.ui:165 msgid "Name of the Slice " msgstr "" #: ../ui/slice_select.ui:204 msgid "URI to open" msgstr "" #: ../ui/slice_select.ui:243 msgid "Command to execute" msgstr "" #: ../ui/slice_select.ui:282 msgid "Hotkey to press" msgstr "" #: ../ui/slice_select.ui:311 msgid "Pie to open" msgstr "" #: ../ui/slice_select.ui:340 msgid "Is Quick Action" msgstr "" #: ../ui/slice_select.ui:354 ../ui/slice_select.ui:355 msgid "This Slice will be executed when you click in the middle of the Pie." msgstr "" #: ../ui/slice_select.ui:388 #, fuzzy msgid "Slice options" msgstr "Applicazioni" #: ../ui/preferences.ui:8 #, fuzzy msgid "Gnome-Pie Settings" msgstr "Gnome-Pie - Impostazioni" #: ../ui/preferences.ui:261 msgid "" "This Pie is empty!\n" "\n" "Start adding Slices to it! This can be done by dragging stuff to the " "plus sign below. You can try a lot! For example application launchers or " "folders. Even URLs from your browser are possible... \n" "\n" "For manual and advanced configuration click on the plus sign." msgstr "" #: ../ui/preferences.ui:282 msgid "" "You have no Pies!\n" "\n" "Start by creating one! This can be done by clicking on the tiny little " "plus sign in the lower left corner." msgstr "" #: ../ui/rename_pie.ui:8 #, fuzzy msgid "Rename a Pie" msgstr "Apri una Torta" #~ msgid "Choose an Icon" #~ msgstr "Scegli un'icona" #~ msgid "Define an open-command" #~ msgstr "Definisci un comando di apertura" #~ msgid "Click here if you want to bind a mouse button!" #~ msgstr "Per assegnare un tasto del mouse clicca qui!" #~ 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?" #~ msgid "by" #~ msgstr "di" #~ msgid "Slice group" #~ msgstr "Gruppo di Fette" #~ msgid "Icon" #~ msgstr "Icona" #~ msgid "Command" #~ msgstr "Comando" #~ msgid "Pie-ID / Action type" #~ msgstr "ID Torta / Tipo di azione" #~ msgid "Name" #~ msgstr "Nome" #~ msgid "Add new Pie" #~ msgstr "Aggiungi nuova Torta" #~ msgid "Delete" #~ msgstr "Elimina" #~ msgid "New Action" #~ msgstr "Nuova Azione" #~ msgid "You have to select a Pie to add a Slice to!" #~ msgstr "Devi selezionare una Torta alla quale aggiungere una Fetta!" #~ msgid "You have to select a Pie or a Slice to delete!" #~ msgstr "Devi selezionare una Torta o una Fetta da eliminare!" #~ msgid "Show Indicator" #~ msgstr "Mostra indicatore" #~ 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." #~ msgid "Open Pies at Mouse" #~ msgstr "Apri Torte dal cursore" #~ 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." #~ msgid "General" #~ msgstr "Generale" #~ msgid "Pies" #~ msgstr "Torte" #~ 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." #~ 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\"." #~ 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." #~ 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\"." #~ msgid "Feel free to visit Gnome-Pie's homepage at %s!" #~ msgstr "" #~ "Sentiti libero di visitare la homepage di Gnome-Pie all'indirizzo %s!" #~ 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." #~ 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!" #~ 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." #~ msgid "Bugs can be reported at %s!" #~ msgstr "I bug possono essere segnalati su %s!" #~ 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." #~ 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." #~ 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!" #~ msgid "Moves the selected Slice down" #~ msgstr "Sposta in basso la Fetta selezionata" #~ msgid "Moves the selected Slice up" #~ msgstr "Sposta in alto la Fetta selezionata" #~ 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." Gnome-Pie-0.5.4/resources/locale/ko/000077500000000000000000000000001204074113200171545ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/ko/LC_MESSAGES/000077500000000000000000000000001204074113200207415ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/ko/LC_MESSAGES/gnomepie.mo000066400000000000000000000214421204074113200231040ustar00rootroot00000000000000id ( *       & 0 : = F _ o }    " H (* S ` y         - D W g ?r C J `AN,. ALS mw     19:Bt     # +7<BQ2Y3C;@%I o } )Df+  Zpw$     $4Tho %L.4c-z)$  /DVkzLL-CzmC3  '+ S ^     ! -& T_ba $/6$Kp     L 8k k K!\!Am! ! ! !%!!"/ ">="w|" "" # ##Z/d- Sc8Qf._CaPGB1+OJW3]5iV"U*e$<%gh620,)[\&>(R@KNHY#9 XbF` !TD7M: A^4 ELI?='; This Pie is empty! Start adding Slices to it! This can be done by dragging stuff to the plus sign below. You can try a lot! For example application launchers or folders. Even URLs from your browser are possible... For manual and advanced configuration click on the plus sign.You have no Pies! Start by creating one! This can be done by clicking on the tiny little plus sign in the lower left corner.ActionsActivation SettingsActivation optionsAll iconsAll supported image formatsApplicationsBehaviorBookmarksButton %iByCenteredClick to add a new SliceClick to deleteClick to editCloseCommand to executeCustom IconDelayedDisplay panel icon Displays your main menu structure.Do you really want to delete the selected Pie with all contained Slices?Do you really want to delete this Slice?Drag to moveDrop to add as new SliceDrop to move SliceEmotesExecutes the given command.File typesGeneral SettingsGlobal scaleGnome-Pie SettingsGroup: BookmarksGroup: ClipboardGroup: DevicesGroup: Main menuGroup: Session ControlGroup: Window ListHotkey to pressIcon ThemeIf checked, Gnome-Pie will start silently everytime you log in.If checked, the Pie will close when you release the chosen hot key.If checked, the Pie will only open if you press this hot key a bit longer.If checked, the Pie will open in the middle of your screen. Else it will pop up at your pointer.If not checked, you can access this menu by launching Gnome-Pie a second time.Is Quick ActionIt's possible to bind mouse buttons as well!Launch applicationLeftButtonLogoutLong press for activationMain MenuManages your Clipboard.MaximizeMiddleButtonMinimizeMiscellaneousMultimediaName of the Slice New PieNext TrackNo Pie selected.Not boundOpen PieOpen Pie centered on the screenOpen URIOpens a given location. You may use URL's or files paths.Opens another Pie of Gnome-Pie. You may create sub menus this way.Pie to openPlacesPlay/PausePress a hotkey ...Press hotkeyPrevious TrackRebootRename a PieRename me!RestoreRightButtonRootScaleSelect an iconSessionShows a Slice for Shutdown, Reboot, and Hibernate.Shows a Slice for each of your directory Bookmarks.Shows a Slice for each of your opened Windows. Almost like Alt-Tab.Shows a Slice for each plugged in devices, like USB-Sticks.ShutdownSimulates the activation of a hotkey.Slice OptionsSlice optionsSlice typesStart Gnome-Pie on loginStopThemesThere are no options for this Slice type.This Slice will be executed when you click in the middle of the Pie.This hotkey is already assigned to the pie "%s"! Please select another one or cancel your selection.TrashTurboTurbo modeURI to openWindowProject-Id-Version: gnomepie 0.2 Report-Msgid-Bugs-To: POT-Creation-Date: 2012-02-29 16:07-0300 PO-Revision-Date: 2012-01-23 00:08+0900 Last-Translator: Kim Boram Language-Team: Korean Language: ko MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=1; plural=0; 파이가 비었습니다! 조각을 추가하십시오! 하단의 더하기 기호에 항목을 끌어다 놓으면 추가할 수 있습니다. 다양한 것을 추가할 수 있습니다! 프로그램 바로 가기나 폴더 뿐이 아니라 웹 브라우저의 주소도 추가할 수 있습니다... 직접 추가하거나 고급 설정에 접근하려면 더하기 기호를 눌러주십시오.파이가 없습니다! 하나 만드는 것부터 시작하십시오! 왼쪽 하단 모서리의 작은 더하기 기호를 누르면 만들 수 있습니다.동작활성화 설정활성화 옵션모든 아이콘지원하는 모든 이미지 형식프로그램행동책갈피%i 단추만든 사람가운데새 조각을 추가하려면 클릭삭제하려면 클릭하세요클릭하여 편집닫기실행할 명령사용자 설정 아이콘시간 지연패널 아이콘 표시주 메뉴 구조를 표시합니다.선택한 파이와 파이 안의 모든 조각을 삭제하시겠습니까?정말 이 조각을 삭제하시겠습니까?이동하려면 끌기새 조각을 추가하려면 떨어트리기조각을 이동하려면 떨어트리기감정주어진 명령을 실행합니다.파일 형식일반 설정전체 크기 조정그놈 파이 설정그룹: 책갈피그룹: 클립보드그룹: 장치그룹: 주 메뉴그룹: 세션 조정그룹: 창 목록누를 바로 가기 키아이콘 테마선택하면 그놈 파이가 로그인할 때 조용하게 시작합니다.선택하면 누른 키보드 바로가기를 떼면 파이를 닫습니다.선택하면 파이를 단축키를 길게 누를 때만 엽니다.선택하면 파이를 화면의 한 가운데에서 실행합니다. 선택하지 않으면 마우스 포인터에 나타납니다.선택하지 않으면 그놈 파이를 두 번째 실행했을 때 이 메뉴에 접근할 수 있습니다.빠른 동작입니다마우스 단추를 함께 묶을 수 없습니다!프로그램 실행왼쪽 단추로그아웃활성화 하려면 길게 누르세요주 메뉴클립보드를 관리합니다.최대화가운데 단추최소화기타멀티미디어조각 이름새 파이다음 트랙선택한 파이가 없습니다.연결하지 않음파이 열기파이를 화면의 가운데에서 엽니다주소 열기주어진 위치를 엽니다. 인터넷 주소나 파일 주소를 이용할 수 있습니다.그놈 파이를 하나 더 엽니다. 이 방법으로 하위 메뉴를 만들 수 있습니다.열 파이위치재생/일시 정지바로 가기 키를 누르세요...단축키를 누르세요이전 트랙다시 시작파이 이름 바꾸기이름을 바꿔주세요!복구오른쪽 단추루트크기 조정아이콘 선택세션시스템 끝내기, 다시 시작, 최대 절전 조각을 표시합니다.각 디렉터리 책갈피의 조각을 표시합니다.열린 각 창의 조각을 표시합니다. 알트 키와 탭 키를 누르는 것과 거의 같습니다.연결한 USB 메모리와 같은 각 장치의 조각을 표시합니다.시스템 끄기키보드 바로 가기로 활성화를 시뮬레이트합니다.조각 옵션조각 옵션조각 형식그놈 파이 로그인할 때 시작정지테마이 형식의 조각은 옵션이 없습니다.파이의 가운데를 클릭해야 조각을 실행합니다.이 단축키는 이미 "%s" 파이에 할당했습니다! 다른 것을 선택하거나 선택을 취소하십시오.휴지통터보터보 모드열 주소창Gnome-Pie-0.5.4/resources/locale/ko/LC_MESSAGES/ko.po000066400000000000000000000441421204074113200217170ustar00rootroot00000000000000# Korean translations for gnomepie package. # Copyright (C) 2011 Simon Schneegans # This file is distributed under the same license as the gnomepie package. # 김보람 , 2011. # msgid "" msgstr "" "Project-Id-Version: gnomepie 0.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-02-29 16:07-0300\n" "PO-Revision-Date: 2012-01-23 00:08+0900\n" "Last-Translator: Kim Boram \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/keyAction.vala:34 msgid "Press hotkey" msgstr "단축키를 누르세요" #: ../../src/actions/keyAction.vala:36 msgid "Simulates the activation of a hotkey." msgstr "키보드 바로 가기로 활성화를 시뮬레이트합니다." #: ../../src/actions/pieAction.vala:34 msgid "Open Pie" msgstr "파이 열기" #: ../../src/actions/pieAction.vala:36 msgid "Opens another Pie of Gnome-Pie. You may create sub menus this way." msgstr "그놈 파이를 하나 더 엽니다. 이 방법으로 하위 메뉴를 만들 수 있습니다." #: ../../src/actions/appAction.vala:34 msgid "Launch application" msgstr "프로그램 실행" #: ../../src/actions/appAction.vala:36 msgid "Executes the given command." msgstr "주어진 명령을 실행합니다." #: ../../src/actions/uriAction.vala:34 msgid "Open URI" msgstr "주소 열기" #: ../../src/actions/uriAction.vala:36 msgid "Opens a given location. You may use URL's or files paths." msgstr "주어진 위치를 엽니다. 인터넷 주소나 파일 주소를 이용할 수 있습니다." #: ../../src/actions/actionRegistry.vala:119 msgid "Trash" msgstr "휴지통" #: ../../src/utilities/trigger.vala:163 msgid "Button %i" msgstr "%i 단추" #: ../../src/utilities/trigger.vala:166 msgid "LeftButton" msgstr "왼쪽 단추" #: ../../src/utilities/trigger.vala:168 msgid "RightButton" msgstr "오른쪽 단추" #: ../../src/utilities/trigger.vala:170 msgid "MiddleButton" msgstr "가운데 단추" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:196 msgid "Turbo" msgstr "터보" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:192 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:198 msgid "Delayed" msgstr "시간 지연" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:200 msgid "Centered" msgstr "가운데" #: ../../src/utilities/trigger.vala:212 ../../src/utilities/trigger.vala:213 #: ../../src/utilities/key.vala:65 ../../src/utilities/bindingManager.vala:161 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:187 msgid "Applications" msgstr "프로그램" #: ../../src/pies/defaultConfig.vala:45 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/piePreview.vala:155 msgid "Do you really want to delete this Slice?" msgstr "정말 이 조각을 삭제하시겠습니까?" #: ../../src/gui/themeList.vala:62 msgid "Themes" msgstr "테마" #: ../../src/gui/themeList.vala:99 msgid "By" msgstr "만든 사람" #: ../../src/gui/newSliceWindow.vala:291 msgid "Rename me!" msgstr "이름을 바꿔주세요!" #: ../../src/gui/triggerSelectWindow.vala:166 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/piePreviewRenderer.vala:412 msgid "Click to edit" msgstr "클릭하여 편집" #: ../../src/gui/piePreviewRenderer.vala:412 #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Drag to move" msgstr "이동하려면 끌기" #: ../../src/gui/piePreviewRenderer.vala:415 msgid "Click to add a new Slice" msgstr "새 조각을 추가하려면 클릭" #: ../../src/gui/piePreviewRenderer.vala:419 msgid "Drop to add as new Slice" msgstr "새 조각을 추가하려면 떨어트리기" #: ../../src/gui/piePreviewRenderer.vala:422 msgid "Drop to move Slice" msgstr "조각을 이동하려면 떨어트리기" #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Click to delete" msgstr "삭제하려면 클릭하세요" #: ../../src/gui/preferencesWindow.vala:175 msgid "No Pie selected." msgstr "선택한 파이가 없습니다." #: ../../src/gui/preferencesWindow.vala:215 msgid "New Pie" msgstr "새 파이" #: ../../src/gui/preferencesWindow.vala:228 msgid "" "Do you really want to delete the selected Pie with all contained Slices?" msgstr "선택한 파이와 파이 안의 모든 조각을 삭제하시겠습니까?" #: ../../src/gui/triggerSelectButton.vala:63 msgid "Press a hotkey ..." msgstr "바로 가기 키를 누르세요..." #: ../../src/gui/sliceTypeList.vala:60 msgid "Slice types" msgstr "조각 형식" #: ../../src/gui/iconSelectWindow.vala:186 msgid "All icons" msgstr "모든 아이콘" #: ../../src/gui/iconSelectWindow.vala:188 msgid "Actions" msgstr "동작" #: ../../src/gui/iconSelectWindow.vala:189 msgid "Places" msgstr "위치" #: ../../src/gui/iconSelectWindow.vala:190 msgid "File types" msgstr "파일 형식" #: ../../src/gui/iconSelectWindow.vala:191 msgid "Emotes" msgstr "감정" #: ../../src/gui/iconSelectWindow.vala:192 msgid "Miscellaneous" msgstr "기타" #: ../../src/gui/iconSelectWindow.vala:267 #: ../../src/gui/iconSelectWindow.vala:269 msgid "All supported image formats" msgstr "지원하는 모든 이미지 형식" #: ../../src/actionGroups/windowListGroup.vala:34 msgid "Group: Window List" msgstr "그룹: 창 목록" #: ../../src/actionGroups/windowListGroup.vala:36 msgid "Shows a Slice for each of your opened Windows. Almost like Alt-Tab." msgstr "" "열린 각 창의 조각을 표시합니다. 알트 키와 탭 키를 누르는 것과 거의 같습니다." #: ../../src/actionGroups/devicesGroup.vala:35 msgid "Group: Devices" msgstr "그룹: 장치" #: ../../src/actionGroups/devicesGroup.vala:37 msgid "Shows a Slice for each plugged in devices, like USB-Sticks." msgstr "연결한 USB 메모리와 같은 각 장치의 조각을 표시합니다." #: ../../src/actionGroups/devicesGroup.vala:85 msgid "Root" msgstr "루트" #: ../../src/actionGroups/bookmarkGroup.vala:36 msgid "Group: Bookmarks" msgstr "그룹: 책갈피" #: ../../src/actionGroups/bookmarkGroup.vala:38 msgid "Shows a Slice for each of your directory Bookmarks." msgstr "각 디렉터리 책갈피의 조각을 표시합니다." #: ../../src/actionGroups/sessionGroup.vala:35 msgid "Group: Session Control" msgstr "그룹: 세션 조정" #: ../../src/actionGroups/sessionGroup.vala:37 msgid "Shows a Slice for Shutdown, Reboot, and Hibernate." msgstr "시스템 끝내기, 다시 시작, 최대 절전 조각을 표시합니다." #: ../../src/actionGroups/sessionGroup.vala:60 msgid "Shutdown" msgstr "시스템 끄기" #: ../../src/actionGroups/sessionGroup.vala:63 msgid "Logout" msgstr "로그아웃" #: ../../src/actionGroups/sessionGroup.vala:66 msgid "Reboot" msgstr "다시 시작" #: ../../src/actionGroups/menuGroup.vala:35 msgid "Group: Main menu" msgstr "그룹: 주 메뉴" #: ../../src/actionGroups/menuGroup.vala:37 msgid "Displays your main menu structure." msgstr "주 메뉴 구조를 표시합니다." #: ../../src/actionGroups/clipboardGroup.vala:64 msgid "Group: Clipboard" msgstr "그룹: 클립보드" #: ../../src/actionGroups/clipboardGroup.vala:66 msgid "Manages your Clipboard." msgstr "클립보드를 관리합니다." #: ../ui/icon_select.ui:8 msgid "Select an icon" msgstr "아이콘 선택" #: ../ui/icon_select.ui:85 msgid "Icon Theme" msgstr "아이콘 테마" #: ../ui/icon_select.ui:105 msgid "Custom Icon" msgstr "사용자 설정 아이콘" #: ../ui/rename_pie.ui:8 msgid "Rename a Pie" msgstr "파이 이름 바꾸기" #: ../ui/preferences.ui:8 msgid "Gnome-Pie Settings" msgstr "그놈 파이 설정" #: ../ui/preferences.ui:27 ../ui/settings.ui:9 msgid "General Settings" msgstr "일반 설정" #: ../ui/preferences.ui:261 msgid "" "This Pie is empty!\n" "\n" "Start adding Slices to it! This can be done by dragging stuff to the " "plus sign below. You can try a lot! For example application launchers or " "folders. Even URLs from your browser are possible... \n" "\n" "For manual and advanced configuration click on the plus sign." msgstr "" "파이가 비었습니다!\n" "\n" "조각을 추가하십시오! 하단의 더하기 기호에 항목을 끌어다 놓으면 추가할 수 " "있습니다. 다양한 것을 추가할 수 있습니다! 프로그램 바로 가기나 폴더 뿐이 아니" "라 웹 브라우저의 주소도 추가할 수 있습니다... \n" "\n" "직접 추가하거나 고급 설정에 접근하려면 더하기 기호를 눌러주십시오." #: ../ui/preferences.ui:282 msgid "" "You have no Pies!\n" "\n" "Start by creating one! This can be done by clicking on the tiny little " "plus sign in the lower left corner." msgstr "" "파이가 없습니다!\n" "\n" "하나 만드는 것부터 시작하십시오! 왼쪽 하단 모서리의 작은 더하기 기호를 " "누르면 만들 수 있습니다." #: ../ui/slice_select.ui:9 msgid "Slice Options" msgstr "조각 옵션" #: ../ui/slice_select.ui:139 msgid "There are no options for this Slice type." msgstr "이 형식의 조각은 옵션이 없습니다." #: ../ui/slice_select.ui:165 msgid "Name of the Slice " msgstr "조각 이름" #: ../ui/slice_select.ui:204 msgid "URI to open" msgstr "열 주소" #: ../ui/slice_select.ui:243 msgid "Command to execute" msgstr "실행할 명령" #: ../ui/slice_select.ui:282 msgid "Hotkey to press" msgstr "누를 바로 가기 키" #: ../ui/slice_select.ui:311 msgid "Pie to open" msgstr "열 파이" #: ../ui/slice_select.ui:340 msgid "Is Quick Action" msgstr "빠른 동작입니다" #: ../ui/slice_select.ui:354 ../ui/slice_select.ui:355 msgid "This Slice will be executed when you click in the middle of the Pie." msgstr "파이의 가운데를 클릭해야 조각을 실행합니다." #: ../ui/slice_select.ui:388 msgid "Slice options" msgstr "조각 옵션" #: ../ui/settings.ui:74 msgid "Start Gnome-Pie on login" msgstr "그놈 파이 로그인할 때 시작" #: ../ui/settings.ui:79 ../ui/settings.ui:80 msgid "If checked, Gnome-Pie will start silently everytime you log in." msgstr "선택하면 그놈 파이가 로그인할 때 조용하게 시작합니다." #: ../ui/settings.ui:93 msgid "Display panel icon " msgstr "패널 아이콘 표시" #: ../ui/settings.ui:98 ../ui/settings.ui:99 msgid "" "If not checked, you can access this menu by launching Gnome-Pie a second " "time." msgstr "" "선택하지 않으면 그놈 파이를 두 번째 실행했을 때 이 메뉴에 접근할 수 있습니다." #: ../ui/settings.ui:118 msgid "Behavior" msgstr "행동" #: ../ui/settings.ui:175 msgid "Global scale" msgstr "전체 크기 조정" #: ../ui/settings.ui:207 #, fuzzy msgid "Display Slice labels" msgstr "패널 아이콘 표시" #: ../ui/settings.ui:212 ../ui/settings.ui:213 msgid "" "Displays the name of each Slice next to it. Only available if supported by " "the theme." msgstr "" #: ../ui/settings.ui:232 #, fuzzy msgid "Appearance" msgstr "모양과 동작" #: ../ui/trigger_select.ui:8 msgid "Activation Settings" msgstr "활성화 설정" #: ../ui/trigger_select.ui:86 msgid "It's possible to bind mouse buttons as well!" msgstr "마우스 단추를 함께 묶을 수 없습니다!" #: ../ui/trigger_select.ui:118 msgid "Turbo mode" msgstr "터보 모드" #: ../ui/trigger_select.ui:123 ../ui/trigger_select.ui:124 msgid "If checked, the Pie will close when you release the chosen hot key." msgstr "선택하면 누른 키보드 바로가기를 떼면 파이를 닫습니다." #: ../ui/trigger_select.ui:137 msgid "Long press for activation" msgstr "활성화 하려면 길게 누르세요" #: ../ui/trigger_select.ui:142 ../ui/trigger_select.ui:143 msgid "" "If checked, the Pie will only open if you press this hot key a bit longer." msgstr "선택하면 파이를 단축키를 길게 누를 때만 엽니다." #: ../ui/trigger_select.ui:156 msgid "Open Pie centered on the screen" msgstr "파이를 화면의 가운데에서 엽니다" #: ../ui/trigger_select.ui:161 ../ui/trigger_select.ui:162 msgid "" "If checked, the Pie will open in the middle of your screen. Else it will pop " "up at your pointer." msgstr "" "선택하면 파이를 화면의 한 가운데에서 실행합니다. 선택하지 않으면 마우스 포인" "터에 나타납니다." #: ../ui/trigger_select.ui:181 msgid "Activation options" msgstr "활성화 옵션" #~ msgid "Choose an Icon" #~ msgstr "아이콘 선택" #~ msgid "Show Indicator" #~ msgstr "알리미 보이기" #~ msgid "" #~ "If checked, an indicator for easy access of the settings menu is shown in " #~ "your panel." #~ msgstr "" #~ "선택하면 설정 메뉴에 쉽게 접근할 수 있도록 패널에 알리미를 표시합니다." #~ msgid "Open Pies at Mouse" #~ msgstr "마우스로 파이 열기" #~ msgid "" #~ "If checked, pies will open at your pointer. Otherwise they'll pop up in " #~ "the middle of the screen." #~ msgstr "" #~ "선택하면 포인터가 있는 곳에 파이가 열립니다. 그렇지 않으면 화면의 가운데" #~ "에 나타납니다." #~ msgid "General" #~ msgstr "일반" #~ msgid "Pies" #~ msgstr "파이" #~ msgid "You can right-click in the list for adding or removing entries." #~ msgstr "항목을 추가 또는 제거하려면 목록에서 오른쪽 단추를 누르세요." #~ msgid "" #~ "You can reset Gnome-Pie to its default options with the terminal command " #~ "\"gnome-pie --reset\"." #~ msgstr "" #~ "터미널에서 \"gnome-pie --reset\" 명령을 입혁하면 그놈 파이를 기본 설정으" #~ "로 되돌릴 수 있습니다." #~ msgid "" #~ "The radiobutton at the beginning of each slice-line indicates the " #~ "QuickAction of the pie." #~ msgstr "" #~ "각 조각 선의 시작 지점에 있는 선택 단추는 파이의 빠른 동작을 의미합니다." #~ msgid "" #~ "Pies can be opened with the terminal command \"gnome-pie --open=ID\"." #~ msgstr "" #~ "터미널에서 \"gnome-pie --open=ID\" 명령을 입력하면 파이를 열 수 있습니다." #~ msgid "Feel free to visit Gnome-Pie's homepage at %s!" #~ msgstr "편하게 그놈 파이 홈페이지 %s에 방문하십시오!" #~ msgid "" #~ "You can drag'n'drop applications from your main menu to the list above." #~ msgstr "주 메뉴에서 위 목록으로 프로그램을 끌어 놓을 수 있습니다." #~ msgid "If you want to give some feedback, please write an e-mail to %s!" #~ msgstr "파드백을 주시려면 주소 %s(으)로 전자 메일을 써주십시오." #~ msgid "" #~ "You may drag'n'drop URLs and bookmarks from your internet browser to the " #~ "list above." #~ msgstr "" #~ "인터넷 브라우저에서 위 목록으로 인터넷 주소와 책갈피를 끌어 놓을 수 있습니" #~ "다." #~ msgid "Bugs can be reported at %s!" #~ msgstr "버그는 %s에서 보고할 수 있습니다!" #~ msgid "" #~ "It's possible to drag'n'drop files and folders from your file browser to " #~ "the list above." #~ msgstr "파일 관리자에서 위 목록으로 파일과 폴더를 끌어 놓을 수 있습니다." #~ msgid "" #~ "It's recommended to keep your Pies small (at most 6-8 Slices). Else they " #~ "will become hard to navigate." #~ msgstr "" #~ "파이를 작게 (최대 6-8 조각) 유지하십시오. 그렇지 않으면 찾기 힘들 수 있습" #~ "니다." #~ msgid "" #~ "In order to create a launcher for a Pie, drag the Pie from the list to " #~ "your desktop!" #~ msgstr "파이 실행 아이콘을 만드려면 데스크톱 목록에서 파이로 끌어 놓으세요!" #~ msgid "Moves the selected Slice down" #~ msgstr "선택한 조각을 아래로 옮기기" #~ msgid "Moves the selected Slice up" #~ msgstr "선택한 조각을 위로 옮기기" #~ msgid "Define an open-command" #~ msgstr "열기 명령 정의" #~ msgid "Click here if you want to bind a mouse button!" #~ msgstr "마우스 단추를 묶으려면 클릭하십시오!" #~ 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 "" #~ "파이를 마우스 왼쪽 단추에 연결하면 시스템을 사용하지 못하게 될 수 있습니" #~ "다. 정말 계속하시겠습니까?" #~ msgid "by" #~ msgstr "작성자" #~ msgid "Slice group" #~ msgstr "조각 그룹" #~ msgid "Icon" #~ msgstr "아이콘" #~ msgid "Command" #~ msgstr "명령" #~ msgid "Pie-ID / Action type" #~ msgstr "파이 ID / 동작 형식" #~ msgid "Name" #~ msgstr "이름" #~ msgid "Add new Pie" #~ msgstr "새 파이 추가" #~ msgid "Delete" #~ msgstr "삭제" #~ msgid "New Action" #~ msgstr "새 동작" #~ msgid "You have to select a Pie to add a Slice to!" #~ msgstr "조각을 추가할 파이를 선택해야 합니다!" #~ msgid "You have to select a Pie or a Slice to delete!" #~ msgstr "삭제하고 싶은 파이와 조각을 선택해야 합니다!" Gnome-Pie-0.5.4/resources/locale/pt_BR/000077500000000000000000000000001204074113200175515ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/pt_BR/LC_MESSAGES/000077500000000000000000000000001204074113200213365ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/pt_BR/LC_MESSAGES/gnomepie.mo000066400000000000000000000212741204074113200235040ustar00rootroot00000000000000l|0 (1 Z     $ @ K X a k u x        U "d H (   2 9 U ` q ~        ?CXJ`NH,  5 >K T bm  9B ]i p{    232Cf;%  # 1=V[)bDf8> D O[yb\9# ; F S a ku y$ $O>)K*/#Bf )?Z!rL<Y.^T<2R   , ;ETm  FD>P X!c     6 <S W B +!-4!b!t!!!!!*!?!a)""" """]2g0 Vf;Ti1bFdSJE4.RMZ6`8lY%X-h'?(jk953/, ^_)A+U!CNQK\&< [eIc $WG:P=#Da7BH OL"@*> This Pie is empty! Start adding Slices to it! This can be done by dragging stuff to the plus sign below. You can try a lot! For example application launchers or folders. Even URLs from your browser are possible... For manual and advanced configuration click on the plus sign.You have no Pies! Start by creating one! This can be done by clicking on the tiny little plus sign in the lower left corner.ActionsActivation SettingsActivation optionsAll iconsAll supported image formatsAppearanceApplicationsBehaviorBookmarksButton %iByCenteredClick to add a new SliceClick to deleteClick to editCloseCommand to executeCustom IconDelayedDisplay Slice labelsDisplay panel icon Displays the name of each Slice next to it. Only available if supported by the theme.Displays your main menu structure.Do you really want to delete the selected Pie with all contained Slices?Do you really want to delete this Slice?Drag to moveDrop to add as new SliceDrop to move SliceEmotesExecutes the given command.File typesGeneral SettingsGlobal scaleGnome-Pie SettingsGroup: BookmarksGroup: ClipboardGroup: DevicesGroup: Main menuGroup: Session ControlGroup: Window ListHotkey to pressIcon ThemeIf checked, Gnome-Pie will start silently everytime you log in.If checked, the Pie will close when you release the chosen hot key.If checked, the Pie will only open if you press this hot key a bit longer.If checked, the Pie will open in the middle of your screen. Else it will pop up at your pointer.If not checked, you can access this menu by launching Gnome-Pie a second time.Is Quick ActionIt's possible to bind mouse buttons as well!Launch applicationLeftButtonLogoutLong press for activationMain MenuManages your Clipboard.MaximizeMiddleButtonMinimizeMiscellaneousMultimediaName of the Slice New PieNext TrackNo Pie selected.Not boundOpen PieOpen Pie centered on the screenOpen URIOpens a given location. You may use URL's or files paths.Opens another Pie of Gnome-Pie. You may create sub menus this way.Pie to openPlacesPlay/PausePress a hotkey ...Press hotkeyPrevious TrackRebootRename a PieRename me!RestoreRightButtonRootScaleSelect an iconSessionShows a Slice for Shutdown, Reboot, and Hibernate.Shows a Slice for each of your directory Bookmarks.Shows a Slice for each of your opened Windows. Almost like Alt-Tab.Shows a Slice for each plugged in devices, like USB-Sticks.ShutdownSimulates the activation of a hotkey.Slice OptionsSlice optionsSlice typesStart Gnome-Pie on loginStopThemesThere are no options for this Slice type.This Slice will be executed when you click in the middle of the Pie.This hotkey is already assigned to the pie "%s"! Please select another one or cancel your selection.TrashTurboTurbo modeURI to openWindowProject-Id-Version: gnomepie 0.5 Report-Msgid-Bugs-To: POT-Creation-Date: 2012-02-29 16:07-0300 PO-Revision-Date: 2012-02-29 15:41-0300 Last-Translator: Magnun Leno Language-Team: Brazilian Portuguese Language: pt_BR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n > 1); Este Menu está vazio!! Comece adicionando algumas Fatias a ele! Isto pode ser feito ao arrastar coisas para o sinal de mais abaixo. Você pode tentar várias coisas! Por exemplo, o lançador de uma aplicação ou pastas. Até mesmo URLs do seu browser... Para configurações manuais e mais avançadas clique no sinal de mais.Você não tem Menus! Comece criando um! Isto pode ser feito ao clicar no pequeno sinal de mais no canto inferior esquerdo.AçõesConfigurações de AtivaçãoOpções de ativaçãoTodos os íconesTodos os tipos de imagem suportadosAparênciaAplicaçõesComportamentoFavoritosBotão %iPorCentralizadoClique para adicionar uma nova FatiaClique para deletarClique para editarFecharComando a ser executadoOutros ÍconesAtrasadoMostrar rótulos da Fatia.Mostrar painel de ícone Mostra ao lado de cada Fatia o seu nome. Disponível apenas se o tema suportar.Mostra a estrutura do seu Menu Principal.Você realmente deseja excluir o Menu selecionado e todas as suas Opções?Você realmente deseja excluir esta Fatia?Arraste para moverSolte para adicionar uma nova FatiaSolte para mover a FatiaEmotesExecuta um dado comando.Tipos de arquivosConfigurações GeraisEscala globalConfigurações do Gnome-PieGrupo: FavoritosGrupo: ClipboardGrupo: DispositivosGrupo: Menu PrincipalGrupo: Controle de SessãoGrupo: Lista de JanelasTecla de Atalho a ser pressionadaTema de ÍconesSe marcado, o Gnome-Pie irá iniciar silenciosamente sempre que você logar.Se marcado, o Menu irá fechar quando o atalho for liberado.Se marcador, o Menu irá abrir somente se você pressionar este atalho por mais um tempo.Se marcador, o Menu irá abrir no meio da sua tela. Caso contrário aparecerá sobre o cursor.Se desmarcado, você pode acessar este menu ao lançar o Gnome-Pie pela segunda vez.É uma ação rápidaTambém é possível vincular os botões do mouse!Lançar aplicaçãoBotão EsquerdoLogoutClique longo para ativaçãoMenu PrincipalGerencia seu Clipboard.MaximizarBotão do MeioMinimizarDiversosMultimídiaNome da Fatia Novo MenuPróxima FaixaNenhum Menu selecionado.Sem vinculaçõesAbrir MenuAbre o Menu no centro da telaAbrir URLAbre um local escolhido. Você pode usar URLs ou caminhos de arquivos.Abre outro Menu do Gnome-Pie. Desta forma você pode criar submenus.Menu a ser abertoLugaresPlay/PausaPressione uma tecla de atalho ...Pressione a tecla de atalhoFaixa AnteriorRebootRenomeia um MenuRenomeie-me!RestaurarBotão DireitoRaizRedimensionarSeleciona um iconeSessãoMostra uma Fatia para Desligar, Reiniciar, e Hibernar.Mostra uma Fatia para cada um de seus diretórios favoritos.Mostra uma Fatia para cada uma de suas janelas abertas. Praticamente igual a o Alt-Tab.Mostra uma Fatia para cada dispositivo conectado, como pen-drives.DesligarSimula a ativação de uma atalho de teclado.Opções da FatiaOpções da FatiaTipos de FatiasIniciar o Gnome-Pie ao logarStopTemasNão há opções para este tipo de Fatia.Esta fatia será executada quando você clicar no meio do Menu.Este atalho já está vinculado no menu "%s"! Por favor escolha outro ou cancele sua seleção.LixeiraTurboModo TurboURI a ser abertaJanelaGnome-Pie-0.5.4/resources/locale/pt_BR/LC_MESSAGES/pt_BR.po000066400000000000000000000443261204074113200227150ustar00rootroot00000000000000# Portuguese translations for gnomepie package. # Copyright (C) 2012 Simon Schneegans # This file is distributed under the same license as the gnomepie package. # Magnun Leno , 2012. # msgid "" msgstr "" "Project-Id-Version: gnomepie 0.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-02-29 16:07-0300\n" "PO-Revision-Date: 2012-02-29 15:41-0300\n" "Last-Translator: Magnun Leno \n" "Language-Team: Brazilian Portuguese\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: ../../src/actions/keyAction.vala:34 msgid "Press hotkey" msgstr "Pressione a tecla de atalho" #: ../../src/actions/keyAction.vala:36 msgid "Simulates the activation of a hotkey." msgstr "Simula a ativação de uma atalho de teclado." #: ../../src/actions/pieAction.vala:34 msgid "Open Pie" msgstr "Abrir Menu" #: ../../src/actions/pieAction.vala:36 msgid "Opens another Pie of Gnome-Pie. You may create sub menus this way." msgstr "Abre outro Menu do Gnome-Pie. Desta forma você pode criar submenus." #: ../../src/actions/appAction.vala:34 msgid "Launch application" msgstr "Lançar aplicação" #: ../../src/actions/appAction.vala:36 msgid "Executes the given command." msgstr "Executa um dado comando." #: ../../src/actions/uriAction.vala:34 msgid "Open URI" msgstr "Abrir URL" #: ../../src/actions/uriAction.vala:36 msgid "Opens a given location. You may use URL's or files paths." msgstr "Abre um local escolhido. Você pode usar URLs ou caminhos de arquivos." #: ../../src/actions/actionRegistry.vala:119 msgid "Trash" msgstr "Lixeira" #: ../../src/utilities/trigger.vala:163 msgid "Button %i" msgstr "Botão %i" #: ../../src/utilities/trigger.vala:166 msgid "LeftButton" msgstr "Botão Esquerdo" #: ../../src/utilities/trigger.vala:168 msgid "RightButton" msgstr "Botão Direito" #: ../../src/utilities/trigger.vala:170 msgid "MiddleButton" msgstr "Botão do Meio" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:196 msgid "Turbo" msgstr "Turbo" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:192 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:198 msgid "Delayed" msgstr "Atrasado" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:200 msgid "Centered" msgstr "Centralizado" #: ../../src/utilities/trigger.vala:212 ../../src/utilities/trigger.vala:213 #: ../../src/utilities/key.vala:65 ../../src/utilities/bindingManager.vala:161 msgid "Not bound" msgstr "Sem vinculações" #: ../../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:36 #: ../../src/gui/iconSelectWindow.vala:187 msgid "Applications" msgstr "Aplicações" #: ../../src/pies/defaultConfig.vala:45 msgid "Bookmarks" msgstr "Favoritos" #: ../../src/pies/defaultConfig.vala:50 msgid "Session" msgstr "Sessão" #: ../../src/pies/defaultConfig.vala:54 msgid "Main Menu" msgstr "Menu Principal" #: ../../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" #: ../../src/gui/piePreview.vala:155 msgid "Do you really want to delete this Slice?" msgstr "Você realmente deseja excluir esta Fatia?" #: ../../src/gui/themeList.vala:62 msgid "Themes" msgstr "Temas" #: ../../src/gui/themeList.vala:99 msgid "By" msgstr "Por" #: ../../src/gui/newSliceWindow.vala:291 msgid "Rename me!" msgstr "Renomeie-me!" #: ../../src/gui/triggerSelectWindow.vala:166 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/piePreviewRenderer.vala:412 msgid "Click to edit" msgstr "Clique para editar" #: ../../src/gui/piePreviewRenderer.vala:412 #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Drag to move" msgstr "Arraste para mover" #: ../../src/gui/piePreviewRenderer.vala:415 msgid "Click to add a new Slice" msgstr "Clique para adicionar uma nova Fatia" #: ../../src/gui/piePreviewRenderer.vala:419 msgid "Drop to add as new Slice" msgstr "Solte para adicionar uma nova Fatia" #: ../../src/gui/piePreviewRenderer.vala:422 msgid "Drop to move Slice" msgstr "Solte para mover a Fatia" #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Click to delete" msgstr "Clique para deletar" #: ../../src/gui/preferencesWindow.vala:175 msgid "No Pie selected." msgstr "Nenhum Menu selecionado." #: ../../src/gui/preferencesWindow.vala:215 msgid "New Pie" msgstr "Novo Menu" #: ../../src/gui/preferencesWindow.vala:228 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/triggerSelectButton.vala:63 msgid "Press a hotkey ..." msgstr "Pressione uma tecla de atalho ..." #: ../../src/gui/sliceTypeList.vala:60 msgid "Slice types" msgstr "Tipos de Fatias" #: ../../src/gui/iconSelectWindow.vala:186 msgid "All icons" msgstr "Todos os ícones" #: ../../src/gui/iconSelectWindow.vala:188 msgid "Actions" msgstr "Ações" #: ../../src/gui/iconSelectWindow.vala:189 msgid "Places" msgstr "Lugares" #: ../../src/gui/iconSelectWindow.vala:190 msgid "File types" msgstr "Tipos de arquivos" #: ../../src/gui/iconSelectWindow.vala:191 msgid "Emotes" msgstr "Emotes" #: ../../src/gui/iconSelectWindow.vala:192 msgid "Miscellaneous" msgstr "Diversos" #: ../../src/gui/iconSelectWindow.vala:267 #: ../../src/gui/iconSelectWindow.vala:269 msgid "All supported image formats" msgstr "Todos os tipos de imagem suportados" #: ../../src/actionGroups/windowListGroup.vala:34 msgid "Group: Window List" msgstr "Grupo: Lista de Janelas" #: ../../src/actionGroups/windowListGroup.vala:36 msgid "Shows a Slice for each of your opened Windows. Almost like Alt-Tab." msgstr "" "Mostra uma Fatia para cada uma de suas janelas abertas. Praticamente igual a " "o Alt-Tab." #: ../../src/actionGroups/devicesGroup.vala:35 msgid "Group: Devices" msgstr "Grupo: Dispositivos" #: ../../src/actionGroups/devicesGroup.vala:37 msgid "Shows a Slice for each plugged in devices, like USB-Sticks." msgstr "Mostra uma Fatia para cada dispositivo conectado, como pen-drives." #: ../../src/actionGroups/devicesGroup.vala:85 msgid "Root" msgstr "Raiz" #: ../../src/actionGroups/bookmarkGroup.vala:36 msgid "Group: Bookmarks" msgstr "Grupo: Favoritos" #: ../../src/actionGroups/bookmarkGroup.vala:38 msgid "Shows a Slice for each of your directory Bookmarks." msgstr "Mostra uma Fatia para cada um de seus diretórios favoritos." #: ../../src/actionGroups/sessionGroup.vala:35 msgid "Group: Session Control" msgstr "Grupo: Controle de Sessão" #: ../../src/actionGroups/sessionGroup.vala:37 msgid "Shows a Slice for Shutdown, Reboot, and Hibernate." msgstr "Mostra uma Fatia para Desligar, Reiniciar, e Hibernar." #: ../../src/actionGroups/sessionGroup.vala:60 msgid "Shutdown" msgstr "Desligar" #: ../../src/actionGroups/sessionGroup.vala:63 msgid "Logout" msgstr "Logout" #: ../../src/actionGroups/sessionGroup.vala:66 msgid "Reboot" msgstr "Reboot" #: ../../src/actionGroups/menuGroup.vala:35 msgid "Group: Main menu" msgstr "Grupo: Menu Principal" #: ../../src/actionGroups/menuGroup.vala:37 msgid "Displays your main menu structure." msgstr "Mostra a estrutura do seu Menu Principal." #: ../../src/actionGroups/clipboardGroup.vala:64 msgid "Group: Clipboard" msgstr "Grupo: Clipboard" #: ../../src/actionGroups/clipboardGroup.vala:66 msgid "Manages your Clipboard." msgstr "Gerencia seu Clipboard." #: ../ui/icon_select.ui:8 msgid "Select an icon" msgstr "Seleciona um icone" #: ../ui/icon_select.ui:85 msgid "Icon Theme" msgstr "Tema de Ícones" #: ../ui/icon_select.ui:105 msgid "Custom Icon" msgstr "Outros Ícones" #: ../ui/rename_pie.ui:8 msgid "Rename a Pie" msgstr "Renomeia um Menu" #: ../ui/preferences.ui:8 msgid "Gnome-Pie Settings" msgstr "Configurações do Gnome-Pie" #: ../ui/preferences.ui:27 ../ui/settings.ui:9 msgid "General Settings" msgstr "Configurações Gerais" #: ../ui/preferences.ui:261 msgid "" "This Pie is empty!\n" "\n" "Start adding Slices to it! This can be done by dragging stuff to the " "plus sign below. You can try a lot! For example application launchers or " "folders. Even URLs from your browser are possible... \n" "\n" "For manual and advanced configuration click on the plus sign." msgstr "" "Este Menu está vazio!!\n" "\n" "Comece adicionando algumas Fatias a ele! Isto pode ser feito ao arrastar " "coisas para o sinal de mais abaixo. Você pode tentar várias coisas! Por " "exemplo, o lançador de uma aplicação ou pastas. Até mesmo URLs do seu " "browser... \n" "\n" "Para configurações manuais e mais avançadas clique no sinal de mais." #: ../ui/preferences.ui:282 msgid "" "You have no Pies!\n" "\n" "Start by creating one! This can be done by clicking on the tiny little " "plus sign in the lower left corner." msgstr "" "Você não tem Menus!\n" "\n" "Comece criando um! Isto pode ser feito ao clicar no pequeno sinal de " "mais no canto inferior esquerdo." #: ../ui/slice_select.ui:9 msgid "Slice Options" msgstr "Opções da Fatia" #: ../ui/slice_select.ui:139 msgid "There are no options for this Slice type." msgstr "Não há opções para este tipo de Fatia." #: ../ui/slice_select.ui:165 msgid "Name of the Slice " msgstr "Nome da Fatia " #: ../ui/slice_select.ui:204 msgid "URI to open" msgstr "URI a ser aberta" #: ../ui/slice_select.ui:243 msgid "Command to execute" msgstr "Comando a ser executado" #: ../ui/slice_select.ui:282 msgid "Hotkey to press" msgstr "Tecla de Atalho a ser pressionada" #: ../ui/slice_select.ui:311 msgid "Pie to open" msgstr "Menu a ser aberto" #: ../ui/slice_select.ui:340 msgid "Is Quick Action" msgstr "É uma ação rápida" #: ../ui/slice_select.ui:354 ../ui/slice_select.ui:355 msgid "This Slice will be executed when you click in the middle of the Pie." msgstr "Esta fatia será executada quando você clicar no meio do Menu." #: ../ui/slice_select.ui:388 msgid "Slice options" msgstr "Opções da Fatia" #: ../ui/settings.ui:74 msgid "Start Gnome-Pie on login" msgstr "Iniciar o Gnome-Pie ao logar" #: ../ui/settings.ui:79 ../ui/settings.ui:80 msgid "If checked, Gnome-Pie will start silently everytime you log in." msgstr "" "Se marcado, o Gnome-Pie irá iniciar silenciosamente sempre que você logar." #: ../ui/settings.ui:93 msgid "Display panel icon " msgstr "Mostrar painel de ícone " #: ../ui/settings.ui:98 ../ui/settings.ui:99 msgid "" "If not checked, you can access this menu by launching Gnome-Pie a second " "time." msgstr "" "Se desmarcado, você pode acessar este menu ao lançar o Gnome-Pie pela " "segunda vez." #: ../ui/settings.ui:118 msgid "Behavior" msgstr "Comportamento" #: ../ui/settings.ui:175 msgid "Global scale" msgstr "Escala global" #: ../ui/settings.ui:207 msgid "Display Slice labels" msgstr "Mostrar rótulos da Fatia." #: ../ui/settings.ui:212 ../ui/settings.ui:213 msgid "" "Displays the name of each Slice next to it. Only available if supported by " "the theme." msgstr "" "Mostra ao lado de cada Fatia o seu nome. Disponível apenas se o tema " "suportar." #: ../ui/settings.ui:232 msgid "Appearance" msgstr "Aparência" #: ../ui/trigger_select.ui:8 msgid "Activation Settings" msgstr "Configurações de Ativação" #: ../ui/trigger_select.ui:86 msgid "It's possible to bind mouse buttons as well!" msgstr "Também é possível vincular os botões do mouse!" #: ../ui/trigger_select.ui:118 msgid "Turbo mode" msgstr "Modo Turbo" #: ../ui/trigger_select.ui:123 ../ui/trigger_select.ui:124 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." #: ../ui/trigger_select.ui:137 msgid "Long press for activation" msgstr "Clique longo para ativação" #: ../ui/trigger_select.ui:142 ../ui/trigger_select.ui:143 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." #: ../ui/trigger_select.ui:156 msgid "Open Pie centered on the screen" msgstr "Abre o Menu no centro da tela" #: ../ui/trigger_select.ui:161 ../ui/trigger_select.ui:162 msgid "" "If checked, the Pie will open in the middle of your screen. Else it will pop " "up at your pointer." msgstr "" "Se marcador, o Menu irá abrir no meio da sua tela. Caso contrário aparecerá " "sobre o cursor." #: ../ui/trigger_select.ui:181 msgid "Activation options" msgstr "Opções de ativação" #~ msgid "by" #~ msgstr "por" #~ msgid "Define an open-command" #~ msgstr "Definir um comando de abertura" #~ msgid "Click here if you want to bind a mouse button!" #~ msgstr "Clique aqui para vincular um botão do mouse!" #~ 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?" #~ msgid "Show Indicator" #~ msgstr "Mostrar Indicador" #~ 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 "Open Pies at Mouse" #~ msgstr "Abrir Menus sobre o Mouse" #~ 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." #~ msgid "General" #~ msgstr "Geral" #~ msgid "Pies" #~ msgstr "Menus" #~ 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." #~ 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\"." #~ 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." #~ 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\"." #~ 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" #~ 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." #~ 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!" #~ 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." #~ msgid "Bugs can be reported at %s!" #~ msgstr "Defeitos podem ser informados em %s!" #~ 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." #~ 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." #~ 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!" #~ msgid "Moves the selected Slice down" #~ msgstr "Move a Opção selecionada para baixo" #~ msgid "Moves the selected Slice up" #~ msgstr "Move a Opção selecionada para cima" #~ msgid "Slice group" #~ msgstr "Grupo de Opções" #~ msgid "Icon" #~ msgstr "Ícone" #~ msgid "Command" #~ msgstr "Comando" #~ msgid "Pie-ID / Action type" #~ msgstr "ID-Opção / Tipo de Ação" #~ msgid "Name" #~ msgstr "Nome" #~ msgid "Add new Pie" #~ msgstr "Adicionar novo Menu" #~ msgid "Delete" #~ msgstr "Deletar" #~ msgid "New Action" #~ msgstr "Nova Ação" #~ 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" #~ msgid "You have to select a Pie or a Slice to delete!" #~ msgstr "Para remover você precisa selecionar um Menu ou uma Opção" #~ msgid "Choose an Icon" #~ msgstr "Escolha um Ícone" #~ 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." Gnome-Pie-0.5.4/resources/locale/ru/000077500000000000000000000000001204074113200171715ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/ru/LC_MESSAGES/000077500000000000000000000000001204074113200207565ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/ru/LC_MESSAGES/gnomepie.mo000066400000000000000000000223571204074113200231270ustar00rootroot00000000000000Tq\ (!J   * 3 = G J S c q w   " H  + > E a l | C J N e ,u       " 0 ; N V a r |   9 B + 7 > I V e l w      2 3 C;X%)Df>  ,{%I-@Qac=u?,/O4`QO\ 43AuDm& EG'G2:L'*Rk4"<3Np)" ' @ Y y  S:!{!y ""f""#Q#cn##$ $$$$SL3)E"G$7-0#:& !J B.I4+N*K 5A<= M98 ?'%,;QO(FT6HD> 1C/@2PRThis Pie is empty! Start adding Slices to it! This can be done by dragging stuff to the plus sign below. You can try a lot! For example application launchers or folders. Even URLs from your browser are possible... For manual and advanced configuration click on the plus sign.You have no Pies! Start by creating one! This can be done by clicking on the tiny little plus sign in the lower left corner.ActionsActivation SettingsAll iconsAll supported image formatsApplicationsBehaviorBookmarksButton %iByCenteredClick to deleteClick to editCloseCommand to executeCustom IconDelayedDisplay panel icon Displays your main menu structure.Do you really want to delete the selected Pie with all contained Slices?Drag to moveDrop to move SliceEmotesExecutes the given command.File typesHotkey to pressIcon ThemeIf checked, the Pie will close when you release the chosen hot key.If checked, the Pie will only open if you press this hot key a bit longer.If not checked, you can access this menu by launching Gnome-Pie a second time.Is Quick ActionIt's possible to bind mouse buttons as well!Launch applicationLeftButtonLogoutLong press for activationMain MenuManages your Clipboard.MaximizeMiddleButtonMinimizeMiscellaneousMultimediaName of the Slice New PieNext TrackNo Pie selected.Not boundOpen PieOpen Pie centered on the screenOpen URIOpens a given location. You may use URL's or files paths.Opens another Pie of Gnome-Pie. You may create sub menus this way.Pie to openPlacesPlay/PausePress hotkeyPrevious TrackRebootRename me!RestoreRightButtonRootScaleSelect an iconSessionShows a Slice for Shutdown, Reboot, and Hibernate.Shows a Slice for each of your directory Bookmarks.Shows a Slice for each of your opened Windows. Almost like Alt-Tab.Shows a Slice for each plugged in devices, like USB-Sticks.ShutdownSimulates the activation of a hotkey.StopThemesThere are no options for this Slice type.This Slice will be executed when you click in the middle of the Pie.This hotkey is already assigned to the pie "%s"! Please select another one or cancel your selection.TrashTurboTurbo modeURI to openWindowProject-Id-Version: gnomepie 0.2 Report-Msgid-Bugs-To: POT-Creation-Date: 2012-02-29 15:58+0100 PO-Revision-Date: 2012-01-14 17:15+0400 Last-Translator: Eugene Roskin Language-Team: Russian Language: ru MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); Этот пай пуст! Начните добавлять в него порции! Выполните это перетаскивая элементы в значок плюса ниже. Делайте многое! Например ярлыки запуска программ или папки.А также адресные ссылки из вашего обозревателя... Для выполнения самостоятельной и подробной настройки, щёлкните на знаке плюса.Отсутствуют паи! Начните с создания пая! Выполните это щёлкнув на небольшом значке плюсав нижнем левом углу.ДействияНастройки активацииВсе значкиВсе поддерживаемые форматы изображенийПриложенияПоведениеЗакладкиКнопка %i-По центруЩёлкните для выполнения удаленияЩёлкните для выполнения измененийЗакрытьКомандая для выполненияНастроить значокЗадержкаПоказывать значок на панели Отображает структуру вашего основного меню.Вы действительно хотите удалить выделенный пай, со всеми содержащимися в нём порциями?Перетаскивайте для выполнения перемещенияПеретаскивайте для выполнения перемещения порцииЭмоцииВыполняет заданную команду.Типы файловКлавиша быстрого доступа для нажатияТема значковЕсли выбрана эта возможность, пай закроется после того, как вы отпустите клавиши быстрого доступаЕсли выбрана эта возможность, пай откроется только, если вы продолжительно зажмёте эту клавишу быстрого доступа.Если эта возможность не выбрана, вы можете получить доступ к этому меню запустив Gnome-Pie второй раз.Это быстрое действиеТакже возможно назначать кнопки мыши!Запустить приложениеЛеваяКнопкаЗавершить сеансПродолжительное нажатие для активацииОсновное менюУправляет вашим буфером обмена.РазвернутьСредняяКнопкаСвернутьДополнительноМультимедиаНазвание порцииНовый пайСледующая композицияПай не выбранНет привязкиОткрытие паяОткрыть пай по центру экранаОткрытие URIОткрывает заданный адрес. Вы можете использовать адресные ссылки или адреса файлов.Oткрывает ещё один пай Gnome-Pie. Таким образом вы можете создавать подменю.Пай для открытияПереходыВоспроизвести или приостановитьНажмите сочетание клавиш быстрого доступаПредыдущая композицияПерезагрузитьПереименуйте меня!ВосстановитьПраваяКнопкаФайловая системаМасштабВыберите значокСеансПоказывает порцию для операций выключения, перезагрузки и спящего режима.Показывает порцию содержащую закладки папок.Показывает порцию для каждого из открытых окон. Как это делает Alt-Tab.Показывает порцию подключённых устройств, например USB-накопителя.ВыключитьИмитирует активацию сочетания клавиш быстрого доступа.ОстановитьТемыОтсутствуют параметры для этого типа порцииЭта порция будет выполнена, после нажатия в центре паяЭта клавиша быстрого доступа уже назначена паю "%s"! Пожалуйста, выберите другую или выполните отмену выбора.КорзинаТурбоТурбо-режимURI для открытияОкноGnome-Pie-0.5.4/resources/locale/ru/LC_MESSAGES/ru.po000066400000000000000000000550011204074113200217450ustar00rootroot00000000000000# Russian translations for gnomepie package # Русские переводы для пакета gnomepie. # Copyright (C) 2012 Simon Schneegans # This file is distributed under the same license as the gnomepie package. # Roskin , 2012. # msgid "" msgstr "" "Project-Id-Version: gnomepie 0.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-02-29 15:58+0100\n" "PO-Revision-Date: 2012-01-14 17:15+0400\n" "Last-Translator: Eugene Roskin \n" "Language-Team: Russian\n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: ../../src/actions/keyAction.vala:34 msgid "Press hotkey" msgstr "Нажмите сочетание клавиш быстрого доступа" #: ../../src/actions/keyAction.vala:36 msgid "Simulates the activation of a hotkey." msgstr "Имитирует активацию сочетания клавиш быстрого доступа." #: ../../src/actions/appAction.vala:34 msgid "Launch application" msgstr "Запустить приложение" #: ../../src/actions/appAction.vala:36 msgid "Executes the given command." msgstr "Выполняет заданную команду." #: ../../src/actions/uriAction.vala:34 msgid "Open URI" msgstr "Открытие URI" #: ../../src/actions/uriAction.vala:36 msgid "Opens a given location. You may use URL's or files paths." msgstr "" "Открывает заданный адрес. Вы можете использовать адресные ссылки или адреса " "файлов." #: ../../src/actions/actionRegistry.vala:119 msgid "Trash" msgstr "Корзина" #: ../../src/actions/pieAction.vala:34 msgid "Open Pie" msgstr "Открытие пая" #: ../../src/actions/pieAction.vala:36 msgid "Opens another Pie of Gnome-Pie. You may create sub menus this way." msgstr "" "Oткрывает ещё один пай Gnome-Pie. Таким образом вы можете создавать подменю." #: ../../src/gui/triggerSelectWindow.vala:166 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/preferencesWindow.vala:175 msgid "No Pie selected." msgstr "Пай не выбран" #: ../../src/gui/preferencesWindow.vala:215 msgid "New Pie" msgstr "Новый пай" #: ../../src/gui/preferencesWindow.vala:228 msgid "" "Do you really want to delete the selected Pie with all contained Slices?" msgstr "" "Вы действительно хотите удалить выделенный пай, со всеми содержащимися в нём " "порциями?" #: ../../src/gui/newSliceWindow.vala:291 msgid "Rename me!" msgstr "Переименуйте меня!" #: ../../src/gui/piePreviewRenderer.vala:412 msgid "Click to edit" msgstr "Щёлкните для выполнения изменений" #: ../../src/gui/piePreviewRenderer.vala:412 #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Drag to move" msgstr "Перетаскивайте для выполнения перемещения" #: ../../src/gui/piePreviewRenderer.vala:415 #, fuzzy msgid "Click to add a new Slice" msgstr "Щёлкните для добавления новой порции" #: ../../src/gui/piePreviewRenderer.vala:419 #, fuzzy msgid "Drop to add as new Slice" msgstr "Перетаскивайте для выполнения добавления в качастве новой порции" #: ../../src/gui/piePreviewRenderer.vala:422 msgid "Drop to move Slice" msgstr "Перетаскивайте для выполнения перемещения порции" #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Click to delete" msgstr "Щёлкните для выполнения удаления" #: ../../src/gui/triggerSelectButton.vala:63 #, fuzzy msgid "Press a hotkey ..." msgstr "Нажмите сочетание клавиш быстрого доступа" #: ../../src/gui/piePreview.vala:155 #, fuzzy msgid "Do you really want to delete this Slice?" msgstr "Вы действительно хотите удалить эту порцию?" #: ../../src/gui/themeList.vala:62 msgid "Themes" msgstr "Темы" #: ../../src/gui/themeList.vala:99 msgid "By" msgstr "-" #: ../../src/gui/sliceTypeList.vala:60 #, fuzzy msgid "Slice types" msgstr "Типы порций" #: ../../src/gui/iconSelectWindow.vala:186 msgid "All icons" msgstr "Все значки" #: ../../src/gui/iconSelectWindow.vala:187 #: ../../src/pies/defaultConfig.vala:36 msgid "Applications" msgstr "Приложения" #: ../../src/gui/iconSelectWindow.vala:188 msgid "Actions" msgstr "Действия" #: ../../src/gui/iconSelectWindow.vala:189 msgid "Places" msgstr "Переходы" #: ../../src/gui/iconSelectWindow.vala:190 msgid "File types" msgstr "Типы файлов" #: ../../src/gui/iconSelectWindow.vala:191 msgid "Emotes" msgstr "Эмоции" #: ../../src/gui/iconSelectWindow.vala:192 msgid "Miscellaneous" msgstr "Дополнительно" #: ../../src/gui/iconSelectWindow.vala:267 #: ../../src/gui/iconSelectWindow.vala:269 msgid "All supported image formats" msgstr "Все поддерживаемые форматы изображений" #: ../../src/actionGroups/windowListGroup.vala:34 #, fuzzy msgid "Group: Window List" msgstr "Группа: Список окон" #: ../../src/actionGroups/windowListGroup.vala:36 msgid "Shows a Slice for each of your opened Windows. Almost like Alt-Tab." msgstr "" "Показывает порцию для каждого из открытых окон. Как это делает Alt-Tab." #: ../../src/actionGroups/menuGroup.vala:35 #, fuzzy msgid "Group: Main menu" msgstr "Группа: Основное меню" #: ../../src/actionGroups/menuGroup.vala:37 msgid "Displays your main menu structure." msgstr "Отображает структуру вашего основного меню." #: ../../src/actionGroups/clipboardGroup.vala:64 #, fuzzy msgid "Group: Clipboard" msgstr "Группа: Буфер обмена" #: ../../src/actionGroups/clipboardGroup.vala:66 msgid "Manages your Clipboard." msgstr "Управляет вашим буфером обмена." #: ../../src/actionGroups/sessionGroup.vala:35 #, fuzzy msgid "Group: Session Control" msgstr "Группа: Управление сеансом" #: ../../src/actionGroups/sessionGroup.vala:37 msgid "Shows a Slice for Shutdown, Reboot, and Hibernate." msgstr "" "Показывает порцию для операций выключения, перезагрузки и спящего режима." #: ../../src/actionGroups/sessionGroup.vala:60 msgid "Shutdown" msgstr "Выключить" #: ../../src/actionGroups/sessionGroup.vala:63 msgid "Logout" msgstr "Завершить сеанс" #: ../../src/actionGroups/sessionGroup.vala:66 msgid "Reboot" msgstr "Перезагрузить" #: ../../src/actionGroups/bookmarkGroup.vala:36 #, fuzzy msgid "Group: Bookmarks" msgstr "Группа: Закладки" #: ../../src/actionGroups/bookmarkGroup.vala:38 msgid "Shows a Slice for each of your directory Bookmarks." msgstr "Показывает порцию содержащую закладки папок." #: ../../src/actionGroups/devicesGroup.vala:35 #, fuzzy msgid "Group: Devices" msgstr "Группа: Устройства" #: ../../src/actionGroups/devicesGroup.vala:37 msgid "Shows a Slice for each plugged in devices, like USB-Sticks." msgstr "Показывает порцию подключённых устройств, например USB-накопителя." #: ../../src/actionGroups/devicesGroup.vala:85 msgid "Root" msgstr "Файловая система" #: ../../src/utilities/bindingManager.vala:161 ../../src/utilities/key.vala:65 #: ../../src/utilities/trigger.vala:212 ../../src/utilities/trigger.vala:213 msgid "Not bound" msgstr "Нет привязки" #: ../../src/utilities/trigger.vala:163 msgid "Button %i" msgstr "Кнопка %i" #: ../../src/utilities/trigger.vala:166 msgid "LeftButton" msgstr "ЛеваяКнопка" #: ../../src/utilities/trigger.vala:168 msgid "RightButton" msgstr "ПраваяКнопка" #: ../../src/utilities/trigger.vala:170 msgid "MiddleButton" msgstr "СредняяКнопка" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:196 msgid "Turbo" msgstr "Турбо" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:192 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:198 msgid "Delayed" msgstr "Задержка" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:200 msgid "Centered" 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:45 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 "Восстановить" #: ../ui/icon_select.ui:8 msgid "Select an icon" msgstr "Выберите значок" #: ../ui/icon_select.ui:85 msgid "Icon Theme" msgstr "Тема значков" #: ../ui/icon_select.ui:105 msgid "Custom Icon" msgstr "Настроить значок" #: ../ui/trigger_select.ui:8 msgid "Activation Settings" msgstr "Настройки активации" #: ../ui/trigger_select.ui:86 msgid "It's possible to bind mouse buttons as well!" msgstr "Также возможно назначать кнопки мыши!" #: ../ui/trigger_select.ui:118 msgid "Turbo mode" msgstr "Турбо-режим" #: ../ui/trigger_select.ui:123 ../ui/trigger_select.ui:124 msgid "If checked, the Pie will close when you release the chosen hot key." msgstr "" "Если выбрана эта возможность, пай закроется после того, как вы отпустите " "клавиши быстрого доступа" #: ../ui/trigger_select.ui:137 msgid "Long press for activation" msgstr "Продолжительное нажатие для активации" #: ../ui/trigger_select.ui:142 ../ui/trigger_select.ui:143 msgid "" "If checked, the Pie will only open if you press this hot key a bit longer." msgstr "" "Если выбрана эта возможность, пай откроется только, если вы продолжительно " "зажмёте эту клавишу быстрого доступа." #: ../ui/trigger_select.ui:156 msgid "Open Pie centered on the screen" msgstr "Открыть пай по центру экрана" #: ../ui/trigger_select.ui:161 ../ui/trigger_select.ui:162 #, fuzzy msgid "" "If checked, the Pie will open in the middle of your screen. Else it will pop " "up at your pointer." msgstr "" "Если выбрана эта возможность, пай откроется в центре вашего экрана.А также " "может открываться чуть выше вашего курсора." #: ../ui/trigger_select.ui:181 #, fuzzy msgid "Activation options" msgstr "Параметры активации" #: ../ui/settings.ui:9 ../ui/preferences.ui:27 #, fuzzy msgid "General Settings" msgstr "Основные настройки" #: ../ui/settings.ui:74 #, fuzzy msgid "Start Gnome-Pie on login" msgstr "Запускать Gnome-Pie при загрузке системы" #: ../ui/settings.ui:79 ../ui/settings.ui:80 #, fuzzy msgid "If checked, Gnome-Pie will start silently everytime you log in." msgstr "" "Если выбрана эта возможность, Gnome-Pie будет фоново запускаться после входа " "в систему." #: ../ui/settings.ui:93 msgid "Display panel icon " msgstr "Показывать значок на панели " #: ../ui/settings.ui:98 ../ui/settings.ui:99 msgid "" "If not checked, you can access this menu by launching Gnome-Pie a second " "time." msgstr "" "Если эта возможность не выбрана, вы можете получить доступ к этому меню " "запустив Gnome-Pie второй раз." #: ../ui/settings.ui:118 msgid "Behavior" msgstr "Поведение" #: ../ui/settings.ui:175 #, fuzzy msgid "Global scale" msgstr "Общий масштаб" #: ../ui/settings.ui:207 #, fuzzy msgid "Display Slice labels" msgstr "Показывать значок на панели " #: ../ui/settings.ui:212 ../ui/settings.ui:213 msgid "" "Displays the name of each Slice next to it. Only available if supported by " "the theme." msgstr "" #: ../ui/settings.ui:232 msgid "Appearance" msgstr "" #: ../ui/slice_select.ui:9 #, fuzzy msgid "Slice Options" msgstr "Параметры порции" #: ../ui/slice_select.ui:139 msgid "There are no options for this Slice type." msgstr "Отсутствуют параметры для этого типа порции" #: ../ui/slice_select.ui:165 msgid "Name of the Slice " msgstr "Название порции" #: ../ui/slice_select.ui:204 msgid "URI to open" msgstr "URI для открытия" #: ../ui/slice_select.ui:243 msgid "Command to execute" msgstr "Командая для выполнения" #: ../ui/slice_select.ui:282 msgid "Hotkey to press" msgstr "Клавиша быстрого доступа для нажатия" #: ../ui/slice_select.ui:311 msgid "Pie to open" msgstr "Пай для открытия" #: ../ui/slice_select.ui:340 msgid "Is Quick Action" msgstr "Это быстрое действие" #: ../ui/slice_select.ui:354 ../ui/slice_select.ui:355 msgid "This Slice will be executed when you click in the middle of the Pie." msgstr "Эта порция будет выполнена, после нажатия в центре пая" #: ../ui/slice_select.ui:388 #, fuzzy msgid "Slice options" msgstr "Параметры порции" #: ../ui/preferences.ui:8 #, fuzzy msgid "Gnome-Pie Settings" msgstr "Настройки Gnome-Pie" #: ../ui/preferences.ui:261 msgid "" "This Pie is empty!\n" "\n" "Start adding Slices to it! This can be done by dragging stuff to the " "plus sign below. You can try a lot! For example application launchers or " "folders. Even URLs from your browser are possible... \n" "\n" "For manual and advanced configuration click on the plus sign." msgstr "" "Этот пай пуст!\n" "\n" "Начните добавлять в него порции! Выполните это перетаскивая элементы в " "значок плюса ниже. Делайте многое! Например ярлыки запуска программ или " "папки.А также адресные ссылки из вашего обозревателя... \n" "\n" "Для выполнения самостоятельной и подробной настройки, щёлкните на знаке " "плюса." #: ../ui/preferences.ui:282 msgid "" "You have no Pies!\n" "\n" "Start by creating one! This can be done by clicking on the tiny little " "plus sign in the lower left corner." msgstr "" "Отсутствуют паи!\n" "\n" "Начните с создания пая! Выполните это щёлкнув на небольшом значке " "плюсав нижнем левом углу." #: ../ui/rename_pie.ui:8 #, fuzzy msgid "Rename a Pie" msgstr "Переименовать пай" #~ msgid "Appearance and behavior" #~ msgstr "Оформление и поведение" #~ msgid "Slice options" #~ msgstr "Параметры порции" #~ msgid "Show Indicator" #~ msgstr "Показать индикатор" #~ msgid "" #~ "If checked, an indicator for easy access of the settings menu is shown in " #~ "your panel." #~ msgstr "" #~ "Если выбрана эта возможность, индикатор быстрого доступа меню настроек, " #~ "будет отображаться на вашей панели" #~ msgid "Open Pies at Mouse" #~ msgstr "Открывать паи при действии мышью" #~ msgid "" #~ "If checked, pies will open at your pointer. Otherwise they'll pop up in " #~ "the middle of the screen." #~ msgstr "" #~ "Если выбрана эта возможность, паи будут открываться рядом с курсором. В " #~ "противном случае, они буду всплывать в середине экрана." #~ msgid "General" #~ msgstr "Основные" #~ msgid "Pies" #~ msgstr "Паи" #~ msgid "You can right-click in the list for adding or removing entries." #~ msgstr "" #~ "Вы можете щёлкнуть правой кнопкой в списке для добавления или удаления " #~ "элементов." #~ msgid "" #~ "You can reset Gnome-Pie to its default options with the terminal command " #~ "\"gnome-pie --reset\"." #~ msgstr "" #~ "Вы можете восстановить первоначальные значения Gnome-Pie с помощью " #~ "команды вводимой в терминале \"gnome-pie --reset\"." #~ msgid "" #~ "The radiobutton at the beginning of each slice-line indicates the " #~ "QuickAction of the pie." #~ msgstr "" #~ "Переключатели в начале каждой строки, отражают быстрое действие порции пая" #~ msgid "" #~ "Pies can be opened with the terminal command \"gnome-pie --open=ID\"." #~ msgstr "" #~ "Паи могут открываться с помощью команды вводимой в терминале\"gnome-pie --" #~ "open=ID\"." #~ msgid "Feel free to visit Gnome-Pie's homepage at %s!" #~ msgstr "Посетите веб-сайт Gnome-Pie по адресу %s!" #~ msgid "" #~ "You can drag'n'drop applications from your main menu to the list above." #~ msgstr "" #~ "Вы можете переместить приложения из вашего основного меню в список выше" #~ msgid "If you want to give some feedback, please write an e-mail to %s!" #~ msgstr "Если вы хотите оставить отзыв, пожалуйста, напишити по адресу %s!" #~ msgid "" #~ "You may drag'n'drop URLs and bookmarks from your internet browser to the " #~ "list above." #~ msgstr "" #~ "Вы можете переносите адресные ссылки и закладки из вашего интернет-" #~ "обозревателя в список выше." #~ msgid "Bugs can be reported at " #~ msgstr "Сообщения о неполадках могут быть отправлены по адресу %s!" #~ msgid "" #~ "It's possible to drag'n'drop files and folders from your file browser to " #~ "the list above." #~ msgstr "" #~ "Возможно переносите файлы и папки из вашего обозревателя файлов в список " #~ "выше." #~ msgid "" #~ "It's recommended to keep your Pies small (at most 6-8 Slices). Else they " #~ "will become hard to navigate." #~ msgstr "" #~ "Рекомендуется сохранять ваши паи небольшими (по 6-8 порций). Иначе они " #~ "станут неудобными для навигации." #~ msgid "" #~ "In order to create a launcher for a Pie, drag the Pie from the list to " #~ "your desktop!" #~ msgstr "" #~ "Для создания ярлыка запуска пая, перенесите пай из списка на ваш рабочий " #~ "стол!" #~ msgid "Moves the selected Slice down" #~ msgstr "Перемещает выделенную порцию вниз" #~ msgid "Moves the selected Slice up" #~ msgstr "Перемещает выделенную порцию вверх" #~ msgid "Slice group" #~ msgstr "Группа порции" #~ msgid "Icon" #~ msgstr "Значок" #~ msgid "Command" #~ msgstr "Команда" #~ msgid "Pie-ID / Action type" #~ msgstr "ID-пая / Тип действия" #~ msgid "Name" #~ msgstr "Название" #~ msgid "Add new Pie" #~ msgstr "Добавить новый пай" #~ msgid "Delete" #~ msgstr "Удалить" #~ msgid "New Action" #~ msgstr "Новое действие" #~ msgid "You have to select a Pie to add a Slice to!" #~ msgstr "Вам необходимо выбрать пай для добавления порции" #~ msgid "You have to select a Pie or a Slice to delete!" #~ msgstr "Вам необходимо выбрать пай или порцию для удаления!" #~ msgid "Define an open-command" #~ msgstr "Определите команду открытия" #~ msgid "Click here if you want to bind a mouse button!" #~ msgstr "Щёлкните здесь, если вы хотите назначить кнопку мыши" #~ 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 "" #~ "Вы можете снизить функциональность системы, если назначите пай - левой " #~ "кнопке мыши. Вы действительно хотите сделать это?" #~ msgid "Choose an Icon" #~ msgstr "Выберите значок" #~ msgid "by" #~ msgstr "-" Gnome-Pie-0.5.4/resources/locale/update-po.sh000077500000000000000000000003361204074113200210020ustar00rootroot00000000000000#!/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 Gnome-Pie-0.5.4/resources/locale/zh_CN/000077500000000000000000000000001204074113200175445ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/zh_CN/LC_MESSAGES/000077500000000000000000000000001204074113200213315ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/locale/zh_CN/LC_MESSAGES/gnomepie.mo000066400000000000000000000202741204074113200234760ustar00rootroot00000000000000l|0 (1 Z     $ @ K X a k u x        U "d H (   2 9 U ` q ~        ?CXJ`NH,  5 >K T bm  9B ]i p{    232Cf;%  # 1=V[)bDf8> D O[MbQ       3@PWgw~OE 'S{ $   +;N^q  AB<<SyJ !% G Ta h u           E&Nl      !4 ; H R `m9t!U@&g$n   *0 M<   ]2g0 Vf;Ti1bFdSJE4.RMZ6`8lY%X-h'?(jk953/, ^_)A+U!CNQK\&< [eIc $WG:P=#Da7BH OL"@*> This Pie is empty! Start adding Slices to it! This can be done by dragging stuff to the plus sign below. You can try a lot! For example application launchers or folders. Even URLs from your browser are possible... For manual and advanced configuration click on the plus sign.You have no Pies! Start by creating one! This can be done by clicking on the tiny little plus sign in the lower left corner.ActionsActivation SettingsActivation optionsAll iconsAll supported image formatsAppearanceApplicationsBehaviorBookmarksButton %iByCenteredClick to add a new SliceClick to deleteClick to editCloseCommand to executeCustom IconDelayedDisplay Slice labelsDisplay panel icon Displays the name of each Slice next to it. Only available if supported by the theme.Displays your main menu structure.Do you really want to delete the selected Pie with all contained Slices?Do you really want to delete this Slice?Drag to moveDrop to add as new SliceDrop to move SliceEmotesExecutes the given command.File typesGeneral SettingsGlobal scaleGnome-Pie SettingsGroup: BookmarksGroup: ClipboardGroup: DevicesGroup: Main menuGroup: Session ControlGroup: Window ListHotkey to pressIcon ThemeIf checked, Gnome-Pie will start silently everytime you log in.If checked, the Pie will close when you release the chosen hot key.If checked, the Pie will only open if you press this hot key a bit longer.If checked, the Pie will open in the middle of your screen. Else it will pop up at your pointer.If not checked, you can access this menu by launching Gnome-Pie a second time.Is Quick ActionIt's possible to bind mouse buttons as well!Launch applicationLeftButtonLogoutLong press for activationMain MenuManages your Clipboard.MaximizeMiddleButtonMinimizeMiscellaneousMultimediaName of the Slice New PieNext TrackNo Pie selected.Not boundOpen PieOpen Pie centered on the screenOpen URIOpens a given location. You may use URL's or files paths.Opens another Pie of Gnome-Pie. You may create sub menus this way.Pie to openPlacesPlay/PausePress a hotkey ...Press hotkeyPrevious TrackRebootRename a PieRename me!RestoreRightButtonRootScaleSelect an iconSessionShows a Slice for Shutdown, Reboot, and Hibernate.Shows a Slice for each of your directory Bookmarks.Shows a Slice for each of your opened Windows. Almost like Alt-Tab.Shows a Slice for each plugged in devices, like USB-Sticks.ShutdownSimulates the activation of a hotkey.Slice OptionsSlice optionsSlice typesStart Gnome-Pie on loginStopThemesThere are no options for this Slice type.This Slice will be executed when you click in the middle of the Pie.This hotkey is already assigned to the pie "%s"! Please select another one or cancel your selection.TrashTurboTurbo modeURI to openWindowProject-Id-Version: gnomepie 0.4 Report-Msgid-Bugs-To: POT-Creation-Date: 2012-07-02 15:04+0800 PO-Revision-Date: 2012-07-02 15:05+0800 Last-Translator: Administrator Language-Team: Chinese (simplified) Language: zh_CN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 16bit 这张派是空的! 开始向其中添加切片吧!您可以通过将各种元素拖放置下方的+号处添加切片。请尽情尝试!试着添加应用程序加载器或者文件夹等。浏览器适用的超链接也不妨一试哦…… 如果需要指示和进一步的配置,点击“+”号图标。您没有新的派! 开始创建您自己的派吧!您可以通过点击窗口左下角的小“+”号创建新的派。行为激活设置激活设置所有图标所有支持的图片类型外观应用程序表现书签按键 %i创作者:居中点击添加新切片点击删除点击以编辑关闭执行的脚本自定义图标延迟显示切片名称显示状态栏图标在切片旁显示每一切片的名称。 当且仅当主题支持时有效。显示您的主菜单您真的希望删除选中的派和它所包含的所有切片吗?您真的希望删除这片切片吗?拖动以重新排布拖放以添加作新切片拖放来移动切片表情图标执行您所给出的脚本指令。文件类型常规设置全局尺寸Gnome派设置群组:书签群组:剪贴板群组:设备群组:主菜单群组:会话控制群组:窗口列表按下热键图标主题如果选中,Gnome派将会在您每次登录后安静启动。如果选中,当您释放快捷键时就会关闭当前的派。如果选中,则派只会在按键一定时间后打开。如果选中,派将会在屏幕的中央出现。 否则将出现在指针位置.如果未选中,您可以通过再次打开Gnome派来访问本菜单。默认动作您也可以绑定鼠标按键!启动程序鼠标左键注销长按启动主菜单管理您的剪贴板。最大化鼠标中键最小化杂项多媒体切片名称新派下一曲目未选择派未定义打开新派居中打开打开URI打开一个指定的位置。您可以使用URL或者文件路径。打开另一张派。您可以通过这种方式来创建菜单和子菜单。打开派位置播放/暂停按下热键……按下热键上一曲目重新启动重命名派给我重命名!恢复鼠标右键根目录收起/张开选择图标会话为关机,重新启动和休眠各显示一片切片。显示您所有的文件夹书签为您每个打开的窗开显示一片切片,效果就像Alt-Tab组合键一样。为每一部插入的设备展示一片切片,比如U盘等。关机模拟按下一组热键的效果。切片选项切片选项切片类型登录时启动Gnome派停止主题当前切片类型没有可用的选项。当您点击派的中央时会执行该切片。该热键已经被指派给 "%s"了! 请另作选择或者放弃选择。垃圾桶极速极速模式打开的URI窗口Gnome-Pie-0.5.4/resources/locale/zh_CN/LC_MESSAGES/zh_CN.po000066400000000000000000000316141204074113200226770ustar00rootroot00000000000000# Chinese translations for gnomepie package. # Copyright (C) 2012 Simon Schneegans # This file is distributed under the same license as the gnomepie package. # Administrator , 2012. # msgid "" msgstr "" "Project-Id-Version: gnomepie 0.4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-07-02 15:04+0800\n" "PO-Revision-Date: 2012-07-02 15:05+0800\n" "Last-Translator: Administrator \n" "Language-Team: Chinese (simplified)\n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 16bit\n" #: ../../src/utilities/trigger.vala:163 msgid "Button %i" msgstr "按键 %i" #: ../../src/utilities/trigger.vala:166 msgid "LeftButton" msgstr "鼠标左键" #: ../../src/utilities/trigger.vala:168 msgid "RightButton" msgstr "鼠标右键" #: ../../src/utilities/trigger.vala:170 msgid "MiddleButton" msgstr "鼠标中键" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:196 msgid "Turbo" msgstr "极速" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:192 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:198 msgid "Delayed" msgstr "延迟" #: ../../src/utilities/trigger.vala:188 ../../src/utilities/trigger.vala:190 #: ../../src/utilities/trigger.vala:194 ../../src/utilities/trigger.vala:200 msgid "Centered" msgstr "居中" #: ../../src/utilities/trigger.vala:212 ../../src/utilities/trigger.vala:213 #: ../../src/utilities/key.vala:65 ../../src/utilities/bindingManager.vala:163 msgid "Not bound" msgstr "未定义" #: ../../src/actionGroups/bookmarkGroup.vala:36 msgid "Group: Bookmarks" msgstr "群组:书签" #: ../../src/actionGroups/bookmarkGroup.vala:38 msgid "Shows a Slice for each of your directory Bookmarks." msgstr "显示您所有的文件夹书签" #: ../../src/actionGroups/windowListGroup.vala:34 msgid "Group: Window List" msgstr "群组:窗口列表" #: ../../src/actionGroups/windowListGroup.vala:36 msgid "Shows a Slice for each of your opened Windows. Almost like Alt-Tab." msgstr "为您每个打开的窗开显示一片切片,效果就像Alt-Tab组合键一样。" #: ../../src/actionGroups/menuGroup.vala:35 msgid "Group: Main menu" msgstr "群组:主菜单" #: ../../src/actionGroups/menuGroup.vala:37 msgid "Displays your main menu structure." msgstr "显示您的主菜单" #: ../../src/actionGroups/sessionGroup.vala:35 msgid "Group: Session Control" msgstr "群组:会话控制" #: ../../src/actionGroups/sessionGroup.vala:37 msgid "Shows a Slice for Shutdown, Reboot, and Hibernate." msgstr "为关机,重新启动和休眠各显示一片切片。" #: ../../src/actionGroups/sessionGroup.vala:60 msgid "Shutdown" msgstr "关机" #: ../../src/actionGroups/sessionGroup.vala:63 msgid "Logout" msgstr "注销" #: ../../src/actionGroups/sessionGroup.vala:66 msgid "Reboot" msgstr "重新启动" #: ../../src/actionGroups/devicesGroup.vala:35 msgid "Group: Devices" msgstr "群组:设备" #: ../../src/actionGroups/devicesGroup.vala:37 msgid "Shows a Slice for each plugged in devices, like USB-Sticks." msgstr "为每一部插入的设备展示一片切片,比如U盘等。" #: ../../src/actionGroups/devicesGroup.vala:85 msgid "Root" msgstr "根目录" #: ../../src/actionGroups/clipboardGroup.vala:64 msgid "Group: Clipboard" msgstr "群组:剪贴板" #: ../../src/actionGroups/clipboardGroup.vala:66 msgid "Manages your Clipboard." msgstr "管理您的剪贴板。" #: ../../src/actions/actionRegistry.vala:119 msgid "Trash" msgstr "垃圾桶" #: ../../src/actions/keyAction.vala:34 msgid "Press hotkey" msgstr "按下热键" #: ../../src/actions/keyAction.vala:36 msgid "Simulates the activation of a hotkey." msgstr "模拟按下一组热键的效果。" #: ../../src/actions/appAction.vala:34 msgid "Launch application" msgstr "启动程序" #: ../../src/actions/appAction.vala:36 msgid "Executes the given command." msgstr "执行您所给出的脚本指令。" #: ../../src/actions/uriAction.vala:34 msgid "Open URI" msgstr "打开URI" #: ../../src/actions/uriAction.vala:36 msgid "Opens a given location. You may use URL's or files paths." msgstr "打开一个指定的位置。您可以使用URL或者文件路径。" #: ../../src/actions/pieAction.vala:34 msgid "Open Pie" msgstr "打开新派" #: ../../src/actions/pieAction.vala:36 msgid "Opens another Pie of Gnome-Pie. You may create sub menus this way." 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:187 msgid "Applications" msgstr "应用程序" #: ../../src/pies/defaultConfig.vala:45 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/triggerSelectButton.vala:64 msgid "Press a hotkey ..." msgstr "按下热键……" #: ../../src/gui/iconSelectWindow.vala:186 msgid "All icons" msgstr "所有图标" #: ../../src/gui/iconSelectWindow.vala:188 msgid "Actions" msgstr "行为" #: ../../src/gui/iconSelectWindow.vala:189 msgid "Places" msgstr "位置" #: ../../src/gui/iconSelectWindow.vala:190 msgid "File types" msgstr "文件类型" #: ../../src/gui/iconSelectWindow.vala:191 msgid "Emotes" msgstr "表情图标" #: ../../src/gui/iconSelectWindow.vala:192 msgid "Miscellaneous" msgstr "杂项" #: ../../src/gui/iconSelectWindow.vala:267 #: ../../src/gui/iconSelectWindow.vala:269 msgid "All supported image formats" msgstr "所有支持的图片类型" #: ../../src/gui/preferencesWindow.vala:175 msgid "No Pie selected." msgstr "未选择派" #: ../../src/gui/preferencesWindow.vala:215 msgid "New Pie" msgstr "新派" #: ../../src/gui/preferencesWindow.vala:228 msgid "" "Do you really want to delete the selected Pie with all contained Slices?" msgstr "" "您真的希望删除选中的派和它所包含的所有切片吗?" #: ../../src/gui/themeList.vala:62 msgid "Themes" msgstr "主题" #: ../../src/gui/themeList.vala:99 msgid "By" msgstr "创作者:" #: ../../src/gui/sliceTypeList.vala:60 msgid "Slice types" msgstr "切片类型" #: ../../src/gui/newSliceWindow.vala:291 msgid "Rename me!" msgstr "给我重命名!" #: ../../src/gui/piePreview.vala:152 msgid "Do you really want to delete this Slice?" msgstr "您真的希望删除这片切片吗?" #: ../../src/gui/triggerSelectWindow.vala:166 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/piePreviewRenderer.vala:412 msgid "Click to edit" msgstr "点击以编辑" #: ../../src/gui/piePreviewRenderer.vala:412 #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Drag to move" msgstr "拖动以重新排布" #: ../../src/gui/piePreviewRenderer.vala:415 msgid "Click to add a new Slice" msgstr "点击添加新切片" #: ../../src/gui/piePreviewRenderer.vala:419 msgid "Drop to add as new Slice" msgstr "拖放以添加作新切片" #: ../../src/gui/piePreviewRenderer.vala:422 msgid "Drop to move Slice" msgstr "拖放来移动切片" #: ../../src/gui/piePreviewRenderer.vala:427 msgid "Click to delete" msgstr "点击删除" #: ../ui/preferences.ui:8 msgid "Gnome-Pie Settings" msgstr "Gnome派设置" #: ../ui/preferences.ui:27 ../ui/settings.ui:9 msgid "General Settings" msgstr "常规设置" #: ../ui/preferences.ui:261 msgid "" "This Pie is empty!\n" "\n" "Start adding Slices to it! This can be done by dragging stuff to the " "plus sign below. You can try a lot! For example application launchers or " "folders. Even URLs from your browser are possible... \n" "\n" "For manual and advanced configuration click on the plus sign." msgstr "" "这张派是空的!\n" "\n" "开始向其中添加切片吧!您可以通过将各种元素拖放置" "下方的+号处添加切片。请尽情尝试!试着添加应用程序加载器" "或者文件夹等。浏览器适用的超链接也不妨一试哦…… \n" "\n" "如果需要指示和进一步的配置,点击“+”号图标。" #: ../ui/preferences.ui:282 msgid "" "You have no Pies!\n" "\n" "Start by creating one! This can be done by clicking on the tiny little " "plus sign in the lower left corner." msgstr "" "您没有新的派!\n" "\n" "开始创建您自己的派吧!您可以通过点击窗口左下角的" "小“+”号创建新的派。" #: ../ui/trigger_select.ui:8 msgid "Activation Settings" msgstr "激活设置" #: ../ui/trigger_select.ui:86 msgid "It's possible to bind mouse buttons as well!" msgstr "您也可以绑定鼠标按键!" #: ../ui/trigger_select.ui:118 msgid "Turbo mode" msgstr "极速模式" #: ../ui/trigger_select.ui:123 ../ui/trigger_select.ui:124 msgid "If checked, the Pie will close when you release the chosen hot key." msgstr "如果选中,当您释放快捷键时就会关闭当前的派。" #: ../ui/trigger_select.ui:137 msgid "Long press for activation" msgstr "长按启动" #: ../ui/trigger_select.ui:142 ../ui/trigger_select.ui:143 msgid "" "If checked, the Pie will only open if you press this hot key a bit longer." msgstr "" "如果选中,则派只会在按键一定时间后打开。" #: ../ui/trigger_select.ui:156 msgid "Open Pie centered on the screen" msgstr "居中打开" #: ../ui/trigger_select.ui:161 ../ui/trigger_select.ui:162 msgid "" "If checked, the Pie will open in the middle of your screen. Else it will pop " "up at your pointer." msgstr "" "如果选中,派将会在屏幕的中央出现。\n" "否则将出现在指针位置." #: ../ui/trigger_select.ui:181 msgid "Activation options" msgstr "激活设置" #: ../ui/settings.ui:74 msgid "Start Gnome-Pie on login" msgstr "登录时启动Gnome派" #: ../ui/settings.ui:79 ../ui/settings.ui:80 msgid "If checked, Gnome-Pie will start silently everytime you log in." msgstr "如果选中,Gnome派将会在您每次登录后安静启动。" #: ../ui/settings.ui:93 msgid "Display panel icon " msgstr "显示状态栏图标" #: ../ui/settings.ui:98 ../ui/settings.ui:99 msgid "" "If not checked, you can access this menu by launching Gnome-Pie a second " "time." msgstr "" "如果未选中,您可以通过再次打开Gnome派" "来访问本菜单。" #: ../ui/settings.ui:118 msgid "Behavior" msgstr "表现" #: ../ui/settings.ui:175 msgid "Global scale" msgstr "全局尺寸" #: ../ui/settings.ui:207 msgid "Display Slice labels" msgstr "显示切片名称" #: ../ui/settings.ui:212 ../ui/settings.ui:213 msgid "" "Displays the name of each Slice next to it. Only available if supported by " "the theme." msgstr "" "在切片旁显示每一切片的名称。\n" "当且仅当主题支持时有效。" #: ../ui/settings.ui:232 msgid "Appearance" msgstr "外观" #: ../ui/icon_select.ui:8 msgid "Select an icon" msgstr "选择图标" #: ../ui/icon_select.ui:85 msgid "Icon Theme" msgstr "图标主题" #: ../ui/icon_select.ui:105 msgid "Custom Icon" msgstr "自定义图标" #: ../ui/rename_pie.ui:8 msgid "Rename a Pie" msgstr "重命名派" #: ../ui/slice_select.ui:9 msgid "Slice Options" msgstr "切片选项" #: ../ui/slice_select.ui:139 msgid "There are no options for this Slice type." msgstr "当前切片类型没有可用的选项。" #: ../ui/slice_select.ui:165 msgid "Name of the Slice " msgstr "切片名称" #: ../ui/slice_select.ui:204 msgid "URI to open" msgstr "打开的URI" #: ../ui/slice_select.ui:243 msgid "Command to execute" msgstr "执行的脚本" #: ../ui/slice_select.ui:282 msgid "Hotkey to press" msgstr "按下热键" #: ../ui/slice_select.ui:311 msgid "Pie to open" msgstr "打开派" #: ../ui/slice_select.ui:340 msgid "Is Quick Action" msgstr "默认动作" #: ../ui/slice_select.ui:354 ../ui/slice_select.ui:355 msgid "This Slice will be executed when you click in the middle of the Pie." msgstr "当您点击派的中央时会执行该切片。" #: ../ui/slice_select.ui:388 msgid "Slice options" msgstr "切片选项" Gnome-Pie-0.5.4/resources/themes/000077500000000000000000000000001204074113200165715ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/themes/adwaita/000077500000000000000000000000001204074113200202035ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/themes/adwaita/arrow.svg000066400000000000000000000067601204074113200220670ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/adwaita/caption_mask.svg000066400000000000000000000104661204074113200234030ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/adwaita/icon_active.svg000066400000000000000000000106001204074113200232040ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/adwaita/icon_inactive.svg000066400000000000000000000105731204074113200235440ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/adwaita/preview.png000066400000000000000000000026041204074113200223740ustar00rootroot00000000000000PNG  IHDR$$sRGBbKGD pHYs  tIME  p|tEXtCommentCreated with GIMPWIDATX͘mL[UsG u))Èe! YEAb?i$ cBO,2C?F2&d7SubY{{{B?ɛ~{/ e&@V>˄H "@0 `T p@**\SSU+tr ݴ'WwKVz{_{`iti bR N~(P1 XZ@HZ3gLAKZgW8]qVϏ?vCTL0@wtPpDyAi| ߚ](fxF^/AA6q܁ ~^)msToq}}q6HJc-++}. ~pH&k`(V+[_ !`Dg+<+Wo.jHubܹw{ Lܗ\V㞚\1 kj,,,Hi"W% ~/ut%S< Aah3I"5NJ If?"}h4Զ @+++ftT\0,L5qi2$".rVf/,!\d`eTQ=8N2Zp!7MjUBdMEF {g\:$hmm/2oTV`zhU.}#>0!nÑӍ^}O[\\*AQ֤`0:u;@4 /--;?FL~EYr{GE"J:@;coZt:D9+@iŒs}<7WhڝlSSs$@ X|; aY85gM\(\R"-//GKJ,//?IJ#NC_ hKA%`f={mq^_#7^L*]_ƨL&?6'ӹ(0g~?@)D.е2;kٌgώj65 FEa>x\zZYvU@"OR+&4tuu=r(/ϴ!I$I=˗'nLLL%#bFJ#oX3'RR image/svg+xml Gnome-Pie-0.5.4/resources/themes/adwaita/theme.xml000066400000000000000000000042771204074113200220410ustar00rootroot00000000000000
Gnome-Pie-0.5.4/resources/themes/bright/000077500000000000000000000000001204074113200200505ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/themes/bright/arrow.svg000066400000000000000000000067601204074113200217340ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/bright/caption.svg000066400000000000000000000114531204074113200222320ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/bright/caption_mask.svg000066400000000000000000000104661204074113200232500ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/bright/gloss.svg000066400000000000000000000120061204074113200217170ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/bright/icon_active.svg000066400000000000000000000102321204074113200230520ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/bright/icon_inactive.svg000066400000000000000000000102451204074113200234050ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/bright/preview.png000066400000000000000000000047571204074113200222540ustar00rootroot00000000000000PNG  IHDR$$sRGBbKGD pHYs B(xtIME,, oIDATXŘs\iZ,"^P@ B9PcrK*TR!Ta ,qfC ےf}f2dKW{~5?s.Y#ɵB!d[yq黿iRK)B ii4e=Bolfc؞:|g, I$I>{h)'mRnu3rm~]CFۖC0x<ѳ@"%<J!gжx/4!<9R,MP*߿hJCAlӜ2ςPm 5!Q*@R4n!%bwyP<3>9jS| |u  0&#-RA0@ܳZ`ZJdt*JӔv@aFJs3PB()QRT@H9&h6hXM? |p(0PHN9)ZDG)@ Gx7[It ,ΰ֮sә,#-0"P!i0 3 $M&*ā" |yuk/"8c0Z{sxqS;p֐9KńA@d*ߛ}-FXk0 9{ZSL] >M1ƀy5T=pg HN-؈0Q3dҏVů~"f?{mD7d/G$JSpbjXG[N;ܗzY} HPJ}אm5.+/k'h4>>̣h-P$0[4>>ZCסwh;'Sk9^[? k+R)q\n mpQ QЎ4.OYk ðf(a<^-RRɗ/qoSxVB-LMH[)VY ٽcKSb<ӽ{3BۆR,Rq bs4usYuuQ&6[UVW7kx!/1`͓ `lV$__-,.{Sv[g:x,>]9] !&XcO9j!aLs[2h""@E1|yj^1q\@ Ƣ`2v#604'ϲCw i]`r8`x#PĽw4?Mu2GOp\ I΂()$=ltcE$)FIe/'?<{xg)LRUUWXZ [F'c(BJE!X x{NkZ壳_7ں!I *RQ/|*1*R!U#B$w}:RTD&W-p28D[Agkk$Bl4[M -K J14 k@isK-&#h+"aV,˨RU q(ɲ,KɲJ7DنĨ/8Z:!:O^˿Wa!,mBg̮FȀ@JDQBk5PI꾩ɔR8w4|C@Y*Ryt]Yaؼڠ\CrϹDƊyC$PL2?QEAB@9:#* t}#%B088ȳO?ɖ'&*0sy6+-P ѣT* &3olrr1, QQ,R]6>Mj~Q*C5)eYE|0 $nk![~]IENDB`Gnome-Pie-0.5.4/resources/themes/bright/ring.svg000066400000000000000000000152651204074113200215410ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/bright/theme.xml000066400000000000000000000047061204074113200217030ustar00rootroot00000000000000
Gnome-Pie-0.5.4/resources/themes/elementary/000077500000000000000000000000001204074113200207365ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/themes/elementary/icon_bg.svg000066400000000000000000000104531204074113200230620ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/elementary/preview.png000066400000000000000000000026021204074113200231250ustar00rootroot00000000000000PNG  IHDR$$sRGBbKGD pHYs  tIME 24Ma^Ͳ7ӑT) uݧQaKPZa^;>> ]Sx<R-)Eq$c̮R)y2 0]Ǭ>99Ye&RJ5j>$9:<< *aN*iy~6B0` RL@TÛa~E &0ޯQrS ZFy( "G OTi:V_|@׽.JVttkn9眯0TuPEdYEy365$.z L뙂|̆YSVjTM HZ~- uLw2}aD6E]z{ºZoa9IENDB`Gnome-Pie-0.5.4/resources/themes/elementary/ring.svg000066400000000000000000000113131204074113200224150ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/elementary/slice_caption.svg000066400000000000000000000071521204074113200243000ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/elementary/theme.xml000066400000000000000000000033731204074113200225700ustar00rootroot00000000000000
Gnome-Pie-0.5.4/resources/themes/funky/000077500000000000000000000000001204074113200177255ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/themes/funky/bg.svg000066400000000000000000000120031204074113200210320ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/funky/blue.svg000066400000000000000000000115061204074113200214000ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/funky/caption.svg000066400000000000000000000071231204074113200221060ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/funky/icon_bg.svg000066400000000000000000000065701204074113200220560ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/funky/icon_fg.svg000066400000000000000000000065701204074113200220620ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/funky/preview.png000066400000000000000000000016741204074113200221240ustar00rootroot00000000000000PNG  IHDR$$sRGBbKGD pHYs B(xtIME+ Z$4PԇD/$/ÈAP@&P,z? *RS0 !{52s{'ggk=Mu9s1ӱ #GBw_9,,:ms2a+vaiqA Xl[.|/'b)ox39a@OPv7p$`8{*&x8U=j)"GaC@-*f$GSBpjI\l;3bG<g uQ%)!kS߆yYы@75qdRy pD"ⲉJ7kZ'&w|Q0>5wKP6^F+1.%< 1~l+dΚAwM؍[TWwduɞr7vMt¸̽.[ c(1=nlwbPu?5IE4# JYikQ??޺SF*8AR1 7%V$ZVPOvT9 5m Wz*3TL, image/svg+xml Gnome-Pie-0.5.4/resources/themes/funky/slice_caption.svg000066400000000000000000000071521204074113200232670ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/funky/star.svg000066400000000000000000000074641204074113200214320ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/funky/theme.xml000066400000000000000000000066161204074113200215620ustar00rootroot00000000000000
Gnome-Pie-0.5.4/resources/themes/gloss/000077500000000000000000000000001204074113200177205ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/themes/gloss/arrow.svg000066400000000000000000000163521204074113200216020ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/gloss/glow_bg.svg000066400000000000000000000100211204074113200220530ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/gloss/icon_bg.svg000066400000000000000000000065151204074113200220500ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/gloss/icon_fg.svg000066400000000000000000000150601204074113200220470ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/gloss/icon_fg_active.svg000066400000000000000000000157241204074113200234110ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/gloss/icon_mask.svg000066400000000000000000000065151204074113200224130ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/gloss/preview.png000066400000000000000000000036551204074113200221200ustar00rootroot00000000000000PNG  IHDR$$sRGBbKGD pHYs  tIME #tEXtCommentCreated with GIMPWIDATX͘]lwf^;ql&q\'5ja&4Eؤ􁕺>E}xTE+5RՊXV *J$-1/oH+$g>ɆMQth=LZnKoRɲK@Ds%DbdaacΝW~)TU}?uHDXI9Kϊh:;;ܹ֗JDQ<1]E9fggсcffDc(..ƞ={"iz8oSSӯ/]2[DOQ hllD*$I_b_RUH$#Lʗ/_5eٟ_HHgϞE&Ayybndd19Ats֥߸qcx֭ş/_9-޽{swm_?:7q9j(İ#X"BOOO" Ï?Au+.nabb"V__7>o-N3#`4Y!r^V(8~ڵ?EK+ԡPhJKK1`} !hBZ[[[;;; j_бk׮Z"pbectI0hvkr2]]]_\rDtk-tީS8pNAfs'(f75ͣ̕ ƀl6|;=+Wxܼy,JqqvZԂ1AZ1I`dYX\y1|n蘞N^zP(w741ÇjG.Ϗ`Dwwgmmmive{}npL&iD"=|0>999 LОZ `0Xt]g,LtE?|7IENDB`Gnome-Pie-0.5.4/resources/themes/gloss/slice_caption.svg000066400000000000000000000137471204074113200232710ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/gloss/theme.xml000066400000000000000000000060631204074113200215510ustar00rootroot00000000000000
Gnome-Pie-0.5.4/resources/themes/minimalistic_text/000077500000000000000000000000001204074113200223175ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/themes/minimalistic_text/bg.svg000066400000000000000000000121751204074113200234360ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/minimalistic_text/fg.svg000066400000000000000000000122221204074113200234330ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/minimalistic_text/preview.png000066400000000000000000000027061204074113200245130ustar00rootroot00000000000000PNG  IHDR$$sRGBbKGD pHYs  tIME $0FIDATXݘkLWpt](u6ZolMƤj5Q>TiMUvHVc|`jAE,O L Xh4/ $Jpk*!7y5<# f B DI\FWݺ@D* Qz\yAngJh#?w3`j6

LUyZn˩^SJZտ͓;`ΛJ30hf=@]`au0!2Z;QSq;cU@!s6GpUb4Ty,YF!(:@S_Mv7P[ǙO40$_J0t$0eQi7e2j.D/`ʞ{:o;WS_^%Y#Mi'ޡS{z/3%U&~ȸ5ObdZA 븝% }\z}.KB[3POk:VoZߺR\a?nCPPUpڧU-SwxOs#[ӫK͘Cf|Ex oW>Kʹ^@VyIw2~I41pCܝf?bk րw8J.8c)$uɀWPf46:\F; *g=koyj/>alwfۍ1s)N^vC>o> GQV;.heW* ]dn%Y+r1(Q8mD<ޣ&RVP |ȚU(W 3]0eA0uSҕ*oRqqS: _lGA ߚQ6/{338-9x,p&Q4c(QyD HP*jQ gѼ6æ: ,2nU?DINj[l(9FYvtZ3TMLt'eWl0rLX ډi1p8'.=JzEF`M~ &;iIENDB`Gnome-Pie-0.5.4/resources/themes/minimalistic_text/theme.xml000066400000000000000000000025021204074113200241420ustar00rootroot00000000000000 Gnome-Pie-0.5.4/resources/themes/o-pie/000077500000000000000000000000001204074113200176025ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/themes/o-pie/arrow.svg000066400000000000000000000076121204074113200214630ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/o-pie/caption1.svg000066400000000000000000000120251204074113200220410ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/o-pie/caption2.svg000066400000000000000000000120021204074113200220350ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/o-pie/preview.png000066400000000000000000000043101204074113200217670ustar00rootroot00000000000000PNG  IHDR$$sRGBbKGD pHYs  tIME!"-JHIDATXí[mWYߘkr鹴$VRD 3 > D%(FKHĨ!% H(J-)={ZzԵ3J֚s}cN~_i}; 8t~!QDM_) LߠwZ{!f/H *HOKНX񊢵1t cjV渚ykḮIUN3zlni>#z=>902`;31ff6/ 'kǔѤL|䅆j0옙̌Ym-%4)2óUfRYVit-鎪 龠;~=kik*Z2_ݪ^N&qU:B)!߯i'+".Hׁ1 {1JK[zf=)qYϝRw,) ʁwYP-–#SF"~PTIZVVYdݤ3tv3xrIeWCQC4QR9͋UQ^WT}O<ocflφB5jF 3eKQ+[ 8u;s|drz]T>%&++4;mɖQ+pՠLi^ZG|֔+w.1nBZc6SuZA4 image/svg+xml Gnome-Pie-0.5.4/resources/themes/o-pie/theme.xml000066400000000000000000000042501204074113200214270ustar00rootroot00000000000000

Gnome-Pie-0.5.4/resources/themes/slim/000077500000000000000000000000001204074113200175355ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/themes/slim/bg.svg000066400000000000000000000133201204074113200206450ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/slim/dot.svg000066400000000000000000000071571204074113200210560ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/slim/preview.png000066400000000000000000000007661204074113200217350ustar00rootroot00000000000000PNG  IHDR$$sRGBbKGD pHYs  tIME )c.RtEXtCommentCreated with GIMPWQIDATX=/A 0%?B$JLJ4B3D2([4C6k77nvL0o&sPkc` h().?Cp;mt|>wz\ lǙvpCIq(7TBÍS2%5mU.g쵱 0<U%yY?Nɪ0LgșB&̅7|szn&Ԏ-kAԯXдPSR)ëJ@E>qA@; h&'L 䞀P@~*J7QQN2Y(KIENDB`Gnome-Pie-0.5.4/resources/themes/slim/slice_caption.svg000066400000000000000000000071521204074113200230770ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/slim/theme.xml000066400000000000000000000064711204074113200213710ustar00rootroot00000000000000
Gnome-Pie-0.5.4/resources/themes/unity/000077500000000000000000000000001204074113200177415ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/themes/unity/arrow.svg000066400000000000000000000067601204074113200216250ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/unity/caption.svg000066400000000000000000000114531204074113200221230ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/unity/caption_mask.svg000066400000000000000000000104661204074113200231410ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/unity/gloss.svg000066400000000000000000000120061204074113200216100ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/unity/icon_active.svg000066400000000000000000000102321204074113200227430ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/unity/icon_inactive.svg000066400000000000000000000102341204074113200232740ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/unity/preview.png000066400000000000000000000055651204074113200221430ustar00rootroot00000000000000PNG  IHDR$$sRGBbKGD pHYs B(xtIMED IDATXŘۓ\uk}9=03HIFWB(SP1TW\ TRɃȋTBJIl*!mE@בfF=}yA Zջvwշu9GYJi41@k13,DD@Fg(MӨFU)%M)j3y:tQDV~رc߻p-ɲL<7{e8޴Z-jLr-yncXe(R˲ XUu!T׵<R!m۶m'z.4Oyn,(Lݶ#NEa{QU꺎eYj~?bUUcPkj쩮k=y!|'& (-3_c+>˭u3̉Z+1HV|vI,i24H1cL1UM=O^O)RJKKKSΝvcCɮoX16~ckU1 )!x/'?߼KGRj.4< j9uPS7d]5y0hؐ1;{d[xNUlYU1"5k!};1XkB"L"4 M]cɪt (oJ* g )E2g1T@D5``D#IHRRnF4Bh1RbDH,y͈ڐejBS)>9?A,.x!P4MMJJ҄F%8|dH#A'A1PkehlpQot}|n&ڞ#"'2>zS9uǁyqTBM0AUƀC#4U ۔97økBQ5D@NlлέLޙbrz˫%!,K.\N{ieB4U#ql1hd8jYU)1BRZ:GԬ,ݻ6 !_ʁc-UW{3K%A;&%skιc( !ڒ6y,7/|.1i}~zsNp\+l_e,SL0?31N6z2&8$˲M@2L]עI%&Cnʬ݋sð6Gw_Zo_^7~E=`v3$[瘿e~P&t(&idZKQVDVͰ7JU8g<c$˲Mʹ-36,{ y joj3KߧH01s+Ġ1EqsȲ,3y'U5A~4Rʇgq`N\[_5r` O<&(_.onɖo~[fݦ{sf4DU *z37f&u5W({$1!BPa,]7|t~5~) a'N_ق 0BÍc& Ea@ T3K 3$q=VyTu Q#$>U ^<77ihH2HFsc)Znc#-$HH9%XBdP(fƯN_~۶Mc<[&+2_\Cs4u EoGZiSƘ+83"Y^`3C ~O8JoA|&9:3jChM꺦Kvѡvi-|S5u]Q5=XCڌ1&20=2o d-k7M3 !0UŐB)d97MUrccx|>Mf ,^h" dyAÿV&3㽷"7{/SSS޿'}>93'V @]` "xtԅPWv@8{Bb%#55&t+/NMxۖ?J 4n߳6;;17,dY&{cǎBBs.y($&&&.{w\E_mv]Vty8q!eѣG,"r+)"씔9IENDB`Gnome-Pie-0.5.4/resources/themes/unity/ring.svg000066400000000000000000000152521204074113200214260ustar00rootroot00000000000000 image/svg+xml Gnome-Pie-0.5.4/resources/themes/unity/theme.xml000066400000000000000000000046671204074113200216020ustar00rootroot00000000000000
Gnome-Pie-0.5.4/resources/ui/000077500000000000000000000000001204074113200157215ustar00rootroot00000000000000Gnome-Pie-0.5.4/resources/ui/icon_select.ui000066400000000000000000000210751204074113200205540ustar00rootroot00000000000000 525 425 False Select an icon False True True dialog 300 200 True False 12 True False 6 True True True False 6 6 True False False True 0 True True gtk-find gtk-clear False False True 1 True True never in True True 2 True False Icon Theme False True False 6 1 True False Custom Icon 1 False True True 0 True False 6 end 16 16 True False False False 0 True gtk-cancel True True True False True False False 1 gtk-ok True True True False True False False 2 False True end 4 True True 0 Gnome-Pie-0.5.4/resources/ui/preferences.ui000066400000000000000000000453551204074113200205750ustar00rootroot00000000000000 600 475 False Gnome-Pie Settings False center False True False True False both-horiz True False False True General Settings True gtk-preferences False True False True 0 False 10 10 True False 6 True False 170 True True never in True True 0 True False icons 1 True False False True list-add-symbolic False True True False False True list-remove-symbolic False True False True 1 False True 0 True False 6 True False 6 True True True False none False True False 48 preferences-desktop-wallpaper False True 0 True False True True True False none True False True False 0 2 end True True 0 True True True False none True False True False 0 2 end True True 1 True True 1 True False False 0 0.11999999731779099 False False 2 False True 0 True False 0 True False True False 2 False 6 6 <b><big>This Pie is empty!</big> Start adding Slices to it!</b> This can be done by dragging stuff to the plus sign below. You can try a lot! For example application launchers or folders. Even URLs from your browser are possible... For manual and advanced configuration click on the plus sign. True fill True 0 False True 0 False 6 6 <b><big>You have no Pies!</big> Start by creating one! </b> This can be done by clicking on the tiny little plus sign in the lower left corner. True fill True 0 False True 1 True False True True 2 True True 1 True True 1 True True 0 True True 1 Gnome-Pie-0.5.4/resources/ui/rename_pie.ui000066400000000000000000000101231204074113200203610ustar00rootroot00000000000000 350 False 5 Rename a Pie False True center-on-parent True dialog False False vertical False end gtk-cancel True True True False True False False 0 gtk-ok True True True False True False False 1 False True end 0 True False 6 6 True True False False True True 0 True True 1 cancel-button ok-button Gnome-Pie-0.5.4/resources/ui/settings.ui000066400000000000000000000332711204074113200201260ustar00rootroot00000000000000 550 450 False 5 General Settings False True center-on-parent True dialog False False vertical False end gtk-close True True True False True False False 0 False True end 0 True False 6 6 True False 0 in True False 6 6 6 6 True False 6 Start Gnome-Pie on login True True False True If checked, Gnome-Pie will start silently everytime you log in. If checked, Gnome-Pie will start silently everytime you log in. False 0 True False True 0 Display panel icon True True False True If not checked, you can access this menu by launching Gnome-Pie a second time. If not checked, you can access this menu by launching Gnome-Pie a second time. False 0 True False True 1 True False Behavior False True 0 True False 0 in True False 6 6 6 6 True False 6 True True never in True True 0 True False 6 True False Global scale False False 0 True True 2 2 2 right True True 1 False True 1 Display Slice labels True True False True Displays the name of each Slice next to it. Only available if supported by the theme. Displays the name of each Slice next to it. Only available if supported by the theme. False 0 True False True 2 True False Appearance True True 4 True True 1 close-button Gnome-Pie-0.5.4/resources/ui/slice_select.ui000066400000000000000000000560511204074113200207250ustar00rootroot00000000000000 550 450 False 5 Slice Options False True center-on-parent True dialog False False vertical False end gtk-close True True True False True False False 0 gtk-ok True True True False True False True 1 False True end 0 True False 6 6 True True never in True True 0 True False 0 in True False 6 6 6 6 True False 6 True True True False none True False 72 application-default-icon False True 0 True False True True False True False 0 There are no options for this Slice type. True True 0 False True 0 True False 6 True True False 0 Name of the Slice True True 0 True True True False True 1 False True 1 True False 6 True True False 0 URI to open True True 0 True True True False True 1 False False 2 True False 6 True True False 0 Command to execute True True 0 True True True False True 1 False False 3 True False 6 True True False 0 Hotkey to press True True 0 False True 4 True False 6 True True False 0 Pie to open True True 0 False True 5 True False 6 True True False 0 Is Quick Action True True 0 True True False True This Slice will be executed when you click in the middle of the Pie. This Slice will be executed when you click in the middle of the Pie. False 0 True True True 1 False True 6 True True 1 True False Slice options False True 1 True True 1 cancel-button ok-button Gnome-Pie-0.5.4/resources/ui/trigger_select.ui000066400000000000000000000253061204074113200212700ustar00rootroot00000000000000 350 False 5 Activation Settings False True center-on-parent True dialog False False vertical False end gtk-cancel True True True False True False False 0 gtk-ok True True True False True False False 1 False True end 0 True False 6 6 True False True True 0 True False 1 It's possible to bind mouse buttons as well! False False 1 True False 0 in True False 6 6 6 6 True False Turbo mode True True False True If checked, the Pie will close when you release the chosen hot key. If checked, the Pie will close when you release the chosen hot key. False 0 True False True 0 Long press for activation True True False True If checked, the Pie will only open if you press this hot key a bit longer. If checked, the Pie will only open if you press this hot key a bit longer. False 0 True False True 1 Open Pie centered on the screen True True False True If checked, the Pie will open in the middle of your screen. Else it will pop up at your pointer. If checked, the Pie will open in the middle of your screen. Else it will pop up at your pointer. False 0 True False True 2 True False Activation options False True 2 True True 1 cancel-button ok-button Gnome-Pie-0.5.4/src/000077500000000000000000000000001204074113200140615ustar00rootroot00000000000000Gnome-Pie-0.5.4/src/CMakeLists.txt000066400000000000000000000040741204074113200166260ustar00rootroot00000000000000################################################################ # Actually compile the executable ################################################################ # determine source and header files file(GLOB VALA_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.vala */*.vala) if (${INDICATOR_FOUND}) LIST(APPEND DEFINES --define HAVE_APPINDICATOR) endif(${INDICATOR_FOUND}) if (${INDICATOR3_FOUND}) LIST(APPEND DEFINES --define HAVE_APPINDICATOR) endif(${INDICATOR3_FOUND}) if (${GTK3_FOUND}) LIST(APPEND DEFINES --define HAVE_GTK_3) endif(${GTK3_FOUND}) if (${GMENU3_FOUND}) LIST(APPEND DEFINES --define HAVE_GMENU_3) endif (${GMENU3_FOUND}) # use valac to compile sources to c files vala_precompile( VALA_C ${VALA_SRC} PACKAGES ${VALA_PKGS} OPTIONS --vapidir=${CMAKE_SOURCE_DIR}/vapi/ --thread ${DEFINES} ) # compile c-sources add_executable(gnome-pie ${VALA_C}) # install executable install( TARGETS gnome-pie RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) # install credits install( FILES ${CMAKE_SOURCE_DIR}/README.md DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/gnome-pie ) # install locales install( DIRECTORY ${CMAKE_SOURCE_DIR}/resources/locale DESTINATION ${CMAKE_INSTALL_PREFIX}/share PATTERN *.po EXCLUDE PATTERN *.pot EXCLUDE PATTERN *.sh EXCLUDE ) # install themes install( DIRECTORY ${CMAKE_SOURCE_DIR}/resources/themes DESTINATION ${CMAKE_INSTALL_PREFIX}/share/gnome-pie ) # install UI files install( DIRECTORY ${CMAKE_SOURCE_DIR}/resources/ui DESTINATION ${CMAKE_INSTALL_PREFIX}/share/gnome-pie ) # install icons install( FILES ${CMAKE_SOURCE_DIR}/resources/gnome-pie.svg ${CMAKE_SOURCE_DIR}/resources/gnome-pie-symbolic.svg DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps ) # desktop file install( FILES ${CMAKE_SOURCE_DIR}/resources/gnome-pie.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications ) # install manpage install( FILES ${CMAKE_SOURCE_DIR}/resources/gnome-pie.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1 ) Gnome-Pie-0.5.4/src/actionGroups/000077500000000000000000000000001204074113200165365ustar00rootroot00000000000000Gnome-Pie-0.5.4/src/actionGroups/actionGroup.vala000066400000000000000000000066721204074113200217100ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// // A base class storing a set of Actions. Derived classes may define // how these Actions are created. This base class serves for custom // actions, defined by the user. ///////////////////////////////////////////////////////////////////////// public class ActionGroup : GLib.Object { ///////////////////////////////////////////////////////////////////// /// A list of all stored actions. ///////////////////////////////////////////////////////////////////// public Gee.ArrayList actions { get; private set; } ///////////////////////////////////////////////////////////////////// /// The ID of the pie to which this group is attached. ///////////////////////////////////////////////////////////////////// public string parent_id { get; construct set; } ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all members. ///////////////////////////////////////////////////////////////////// public ActionGroup(string parent_id) { GLib.Object(parent_id : parent_id); } construct { this.actions = new Gee.ArrayList(); } ///////////////////////////////////////////////////////////////////// /// This one is called, when the ActionGroup is deleted. ///////////////////////////////////////////////////////////////////// public virtual void on_remove() {} ///////////////////////////////////////////////////////////////////// /// Adds a new Action to the group. ///////////////////////////////////////////////////////////////////// public void add_action(Action new_action) { this.actions.add(new_action); } ///////////////////////////////////////////////////////////////////// /// Removes all Actions from the group. ///////////////////////////////////////////////////////////////////// public void delete_all() { actions.clear(); } ///////////////////////////////////////////////////////////////////// /// Makes all contained Slices no Quick Actions. ///////////////////////////////////////////////////////////////////// public void disable_quickactions() { foreach (var action in actions) action.is_quickaction = false; } ///////////////////////////////////////////////////////////////////// /// Returns true, if one o the contained Slices is a Quick Action ///////////////////////////////////////////////////////////////////// public bool has_quickaction() { foreach (var action in actions) if (action.is_quickaction) return true; return false; } } } Gnome-Pie-0.5.4/src/actionGroups/bookmarkGroup.vala000066400000000000000000000127321204074113200222320ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A group of Actions, which represent the users gtk-bookmarks, his home /// directory, desktop and trash. It stay up-to-date, even if the /// bookmarks change. ///////////////////////////////////////////////////////////////////////// public class BookmarkGroup : 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 GroupRegistry.TypeDescription register() { var description = new GroupRegistry.TypeDescription(); description.name = _("Group: Bookmarks"); description.icon = "user-bookmarks"; description.description = _("Shows a Slice for each of your directory Bookmarks."); description.id = "bookmarks"; return description; } ///////////////////////////////////////////////////////////////////// /// Two members needed to avoid useless, frequent changes of the /// stored Actions. ///////////////////////////////////////////////////////////////////// private bool changing = false; private bool changed_again = false; ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all members. ///////////////////////////////////////////////////////////////////// public BookmarkGroup(string parent_id) { GLib.Object(parent_id : parent_id); } ///////////////////////////////////////////////////////////////////// /// Construct block loads the bookmarks of the user and adds a file /// monitor in order to update the BookmarkGroup when the bookmarks /// of the user change. ///////////////////////////////////////////////////////////////////// construct { this.load(); // add monitor var bookmark_file = GLib.File.new_for_path( GLib.Environment.get_home_dir()).get_child(".gtk-bookmarks"); if (bookmark_file.query_exists()) { try { var monitor = bookmark_file.monitor(GLib.FileMonitorFlags.NONE); monitor.changed.connect(this.reload); } catch (GLib.Error e) { warning(e.message); } } } ///////////////////////////////////////////////////////////////////// /// Adds Actions for each gtk-bookmark of the user and for his home /// folder, desktop and trash. ///////////////////////////////////////////////////////////////////// private void load() { // add home folder this.add_action(ActionRegistry.new_for_uri("file://" + GLib.Environment.get_home_dir())); // add .gtk-bookmarks var bookmark_file = GLib.File.new_for_path( GLib.Environment.get_home_dir()).get_child(".gtk-bookmarks"); if (!bookmark_file.query_exists()) { warning("Failed to find file \".gtk-bookmarks\"!"); return; } try { var dis = new DataInputStream(bookmark_file.read()); string line; while ((line = dis.read_line(null)) != null) { var parts = line.split(" "); string uri = parts[0]; string name = parts[1]; this.add_action(ActionRegistry.new_for_uri(uri, name)); } } catch (Error e) { error ("%s", e.message); } // add 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))); } ///////////////////////////////////////////////////////////////////// /// Reloads all Bookmarks. Is called when the user's gtk-bookmarks /// file changes. ///////////////////////////////////////////////////////////////////// private void reload() { // avoid too frequent changes... if (!this.changing) { this.changing = true; Timeout.add(200, () => { if (this.changed_again) { this.changed_again = false; return true; } // reload message("Bookmarks changed..."); this.delete_all(); this.load(); this.changing = false; return false; }); } else { this.changed_again = true; } } } } Gnome-Pie-0.5.4/src/actionGroups/clipboardGroup.vala000066400000000000000000000102001204074113200223500ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// This Group keeps a history of the last used Clipboard entries. /// Experimental. Not enabled. ///////////////////////////////////////////////////////////////////////// public class ClipboardGroup : ActionGroup { ///////////////////////////////////////////////////////////////////// /// ///////////////////////////////////////////////////////////////////// private class ClipboardItem : GLib.Object { public string name { get; private set; } public string icon { get; private set; } private Gtk.SelectionData contents; public ClipboardItem(Gtk.SelectionData contents) { this.contents = contents.copy(); this.name = this.contents.get_text() ?? ""; this.icon = "edit-paste"; } public void paste() { debug(name); } } public ClipboardGroup(string parent_id) { GLib.Object(parent_id : parent_id); } ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// /// 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 GroupRegistry.TypeDescription register() { var description = new GroupRegistry.TypeDescription(); description.name = _("Group: Clipboard"); description.icon = "edit-paste"; description.description = _("Manages your Clipboard."); description.id = "clipboard"; return description; } ///////////////////////////////////////////////////////////////////// /// The clipboard to be monitored. ///////////////////////////////////////////////////////////////////// private Gtk.Clipboard clipboard; ///////////////////////////////////////////////////////////////////// /// The maximum remembered items of the clipboard. ///////////////////////////////////////////////////////////////////// private const int max_items = 6; private Gee.ArrayList items; construct { this.items = new Gee.ArrayList(); this.clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD); this.clipboard.owner_change.connect(this.on_change); } private void on_change() { if (this.clipboard.wait_is_text_available()) { this.clipboard.request_contents(Gdk.Atom.intern("text/plain", false), this.add_item); } } private void add_item(Gtk.Clipboard c, Gtk.SelectionData contents) { var new_item = new ClipboardItem(contents); if (this.items.size == this.max_items) this.items.remove_at(0); this.items.add(new_item); // update slices this.delete_all(); for (int i=0; i { this.items[int.parse(action.real_command)].paste(); }); this.add_action(action); } } } } Gnome-Pie-0.5.4/src/actionGroups/devicesGroup.vala000066400000000000000000000110041204074113200220360ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////// /// An ActionGroup which contains all currently plugged-in devices, /// such as CD-ROM's or USB-sticks. ///////////////////////////////////////////////////////////////////// public class DevicesGroup : 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 GroupRegistry.TypeDescription register() { var description = new GroupRegistry.TypeDescription(); description.name = _("Group: Devices"); description.icon = "harddrive"; description.description = _("Shows a Slice for each plugged in devices, like USB-Sticks."); description.id = "devices"; return description; } ///////////////////////////////////////////////////////////////////// /// Two members needed to avoid useless, frequent changes of the /// stored Actions. ///////////////////////////////////////////////////////////////////// private bool changing = false; private bool changed_again = false; ///////////////////////////////////////////////////////////////////// /// The VolumeMonitor used to check for added or removed devices. ///////////////////////////////////////////////////////////////////// private GLib.VolumeMonitor monitor; ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all members. ///////////////////////////////////////////////////////////////////// public DevicesGroup(string parent_id) { GLib.Object(parent_id : parent_id); } ///////////////////////////////////////////////////////////////////// /// Construct block loads all currently plugged-in devices and /// connects signal handlers to the VolumeMonitor. ///////////////////////////////////////////////////////////////////// construct { this.monitor = GLib.VolumeMonitor.get(); this.load(); // add monitor this.monitor.mount_added.connect(this.reload); this.monitor.mount_removed.connect(this.reload); } ///////////////////////////////////////////////////////////////////// /// Loads all currently plugged-in devices. ///////////////////////////////////////////////////////////////////// private void load() { // add root device this.add_action(new UriAction(_("Root"), "harddrive", "file:///")); // add all other devices foreach(var mount in this.monitor.get_mounts()) { // get icon var icon = mount.get_icon(); this.add_action(new UriAction(mount.get_name(), Icon.get_icon_name(icon), mount.get_root().get_uri())); } } ///////////////////////////////////////////////////////////////////// /// Reloads all devices. Is called when the VolumeMonitor changes. ///////////////////////////////////////////////////////////////////// private void reload() { // avoid too frequent changes... if (!this.changing) { this.changing = true; Timeout.add(200, () => { if (this.changed_again) { this.changed_again = false; return true; } // reload message("Devices changed..."); this.delete_all(); this.load(); this.changing = false; return false; }); } else { this.changed_again = true; } } } } Gnome-Pie-0.5.4/src/actionGroups/groupRegistry.vala000066400000000000000000000074411204074113200222760ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A which has knowledge on all possible acion group types. ///////////////////////////////////////////////////////////////////////// public class GroupRegistry : GLib.Object { ///////////////////////////////////////////////////////////////////// /// A list containing all available ActionGroup types. ///////////////////////////////////////////////////////////////////// public static Gee.ArrayList types { get; private set; } ///////////////////////////////////////////////////////////////////// /// A map associating a displayable name for each ActionGroup, /// an icon name and a name for the pies.conf file with it's type. ///////////////////////////////////////////////////////////////////// public static Gee.HashMap descriptions { get; private set; } public class TypeDescription { public string name { get; set; default=""; } public string icon { get; set; default=""; } public string description { get; set; default=""; } public string id { get; set; default=""; } } ///////////////////////////////////////////////////////////////////// /// Registers all ActionGroup types. ///////////////////////////////////////////////////////////////////// public static void init() { types = new Gee.ArrayList(); descriptions = new Gee.HashMap(); TypeDescription type_description; type_description = BookmarkGroup.register(); types.add(typeof(BookmarkGroup).name()); descriptions.set(typeof(BookmarkGroup).name(), type_description); type_description = DevicesGroup.register(); types.add(typeof(DevicesGroup).name()); descriptions.set(typeof(DevicesGroup).name(), type_description); type_description = MenuGroup.register(); types.add(typeof(MenuGroup).name()); descriptions.set(typeof(MenuGroup).name(), type_description); type_description = SessionGroup.register(); types.add(typeof(SessionGroup).name()); descriptions.set(typeof(SessionGroup).name(), type_description); type_description = WindowListGroup.register(); types.add(typeof(WindowListGroup).name()); descriptions.set(typeof(WindowListGroup).name(), type_description); } ///////////////////////////////////////////////////////////////////// /// Creates a Group for a given type name. ///////////////////////////////////////////////////////////////////// public static ActionGroup? create_group(string type_id, string parent_id) { switch (type_id) { case "bookmarks": return new BookmarkGroup(parent_id); case "devices": return new DevicesGroup(parent_id); case "menu": return new MenuGroup(parent_id); case "session": return new SessionGroup(parent_id); case "window_list": return new WindowListGroup(parent_id); } return null; } } } Gnome-Pie-0.5.4/src/actionGroups/menuGroup.vala000066400000000000000000000236101204074113200213660ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// An ActionGroup which displays the user's main menu. It's a bit ugly, /// but it supports both, an older version and libgnome-menus-3 at the /// same time. ///////////////////////////////////////////////////////////////////////// public class MenuGroup : 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 GroupRegistry.TypeDescription register() { var description = new GroupRegistry.TypeDescription(); description.name = _("Group: Main menu"); description.icon = "gnome-main-menu"; description.description = _("Displays your main menu structure."); description.id = "menu"; return description; } ///////////////////////////////////////////////////////////////////// /// True, if this MenuGroup is the top most menu. ///////////////////////////////////////////////////////////////////// public bool is_toplevel {get; construct set; default = true;} ///////////////////////////////////////////////////////////////////// /// The menu tree displayed by the MenuGroup. Only set for the /// toplevel MenuGroup. ///////////////////////////////////////////////////////////////////// private GMenu.Tree menu = null; ///////////////////////////////////////////////////////////////////// /// A list of all sub menus of this MenuGroup. ///////////////////////////////////////////////////////////////////// private Gee.ArrayList childs; ///////////////////////////////////////////////////////////////////// /// Two members needed to avoid useless, frequent changes of the /// stored Actions. ///////////////////////////////////////////////////////////////////// private bool changing = false; private bool changed_again = false; ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all members. Used for the toplevel menu. ///////////////////////////////////////////////////////////////////// public MenuGroup(string parent_id) { GLib.Object(parent_id : parent_id, is_toplevel : true); } ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all members. Used for sub menus. ///////////////////////////////////////////////////////////////////// public MenuGroup.sub_menu(string parent_id) { GLib.Object(parent_id : parent_id, is_toplevel : false); } construct { this.childs = new Gee.ArrayList(); if (this.is_toplevel) { #if HAVE_GMENU_3 this.menu = new GMenu.Tree("applications.menu", GMenu.TreeFlags.INCLUDE_EXCLUDED); this.menu.changed.connect(this.reload); #endif this.load_toplevel(); } } ///////////////////////////////////////////////////////////////////// /// Starts to load the menu. ///////////////////////////////////////////////////////////////////// private void load_toplevel() { #if HAVE_GMENU_3 try { if (this.menu.load_sync()) { this.load_contents(this.menu.get_root_directory(), this.parent_id); } } catch (GLib.Error e) { warning(e.message); } #else this.menu = GMenu.Tree.lookup ("applications.menu", GMenu.TreeFlags.INCLUDE_EXCLUDED); this.menu.add_monitor(this.reload); var dir = this.menu.get_root_directory(); this.load_contents(dir, this.parent_id); #endif } ///////////////////////////////////////////////////////////////////// /// Parses the main menu recursively. ///////////////////////////////////////////////////////////////////// private void load_contents(GMenu.TreeDirectory dir, string parent_id) { #if HAVE_GMENU_3 var item = dir.iter(); while (true) { var type = item.next(); if (type == GMenu.TreeItemType.INVALID) break; if (type == GMenu.TreeItemType.DIRECTORY && !item.get_directory().get_is_nodisplay()) { // create a MenuGroup for sub menus // get icon var icon = item.get_directory().get_icon(); var sub_menu = PieManager.create_dynamic_pie(item.get_directory().get_name(), Icon.get_icon_name(icon)); var group = new MenuGroup.sub_menu(sub_menu.id); group.add_action(new PieAction(parent_id, true)); group.load_contents(item.get_directory(), sub_menu.id); childs.add(group); sub_menu.add_group(group); this.add_action(new PieAction(sub_menu.id)); } else if (type == GMenu.TreeItemType.ENTRY ) { // create an AppAction for entries if (!item.get_entry().get_is_excluded()) { this.add_action(ActionRegistry.new_for_app_info(item.get_entry().get_app_info())); } } } #else foreach (var item in dir.get_contents()) { switch(item.get_type()) { case GMenu.TreeItemType.DIRECTORY: // create a MenuGroup for sub menus if (!((GMenu.TreeDirectory)item).get_is_nodisplay()) { var sub_menu = PieManager.create_dynamic_pie( ((GMenu.TreeDirectory)item).get_name(), ((GMenu.TreeDirectory)item).get_icon()); var group = new MenuGroup.sub_menu(sub_menu.id); group.add_action(new PieAction(parent_id, true)); group.load_contents((GMenu.TreeDirectory)item, sub_menu.id); childs.add(group); sub_menu.add_group(group); this.add_action(new PieAction(sub_menu.id)); } break; case GMenu.TreeItemType.ENTRY: // create an AppAction for entries if (!((GMenu.TreeEntry)item).get_is_nodisplay() && !((GMenu.TreeEntry)item).get_is_excluded()) { this.add_action(new AppAction(((GMenu.TreeEntry)item).get_name(), ((GMenu.TreeEntry)item).get_icon(), ((GMenu.TreeEntry)item).get_exec())); } break; } } #endif } ///////////////////////////////////////////////////////////////////// /// Reloads the menu. ///////////////////////////////////////////////////////////////////// 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 message("Main menu changed..."); #if !HAVE_GMENU_3 this.menu.remove_monitor(this.reload); #endif this.clear(); this.load_toplevel(); this.changing = false; return false; }); } else { this.changed_again = true; } } ///////////////////////////////////////////////////////////////////// /// Deletes all generated Pies, when the toplevel menu is deleted. ///////////////////////////////////////////////////////////////////// public override void on_remove() { if (this.is_toplevel) this.clear(); } ///////////////////////////////////////////////////////////////////// /// Clears this ActionGroup recursively. ///////////////////////////////////////////////////////////////////// private void clear() { foreach (var child in childs) child.clear(); if (!this.is_toplevel) PieManager.remove_pie(this.parent_id); this.delete_all(); this.childs.clear(); #if !HAVE_GMENU_3 this.menu = null; #endif } } } Gnome-Pie-0.5.4/src/actionGroups/sessionGroup.vala000066400000000000000000000074011204074113200221050ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////// /// An ActionGroup which has three Actions: Logout, Shutdown and /// Reboot. ///////////////////////////////////////////////////////////////////// public class SessionGroup : 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 GroupRegistry.TypeDescription register() { var description = new GroupRegistry.TypeDescription(); description.name = _("Group: Session Control"); description.icon = "gnome-logout"; description.description = _("Shows a Slice for Shutdown, Reboot, and Hibernate."); description.id = "session"; return description; } ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all members. ///////////////////////////////////////////////////////////////////// public SessionGroup(string parent_id) { GLib.Object(parent_id : parent_id); } ///////////////////////////////////////////////////////////////////// /// Construct block adds the three Actions. ///////////////////////////////////////////////////////////////////// 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")); this.add_action(new AppAction(_("Logout"), "gnome-session-logout", "dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Logout uint32:1")); this.add_action(new AppAction(_("Reboot"), "gnome-session-reboot", "dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.RequestReboot")); } // TODO: check for available interfaces --- these may work too: // 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 --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop } } Gnome-Pie-0.5.4/src/actionGroups/windowListGroup.vala000066400000000000000000000124761204074113200225750ustar00rootroot00000000000000/* 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 . */ 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 GroupRegistry.TypeDescription register() { var description = new GroupRegistry.TypeDescription(); description.name = _("Group: Window List"); description.icon = "gnome-window-manager"; description.description = _("Shows a Slice for each of your opened Windows. Almost like Alt-Tab."); description.id = "window_list"; return description; } ///////////////////////////////////////////////////////////////////// /// 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 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; } } } } Gnome-Pie-0.5.4/src/actions/000077500000000000000000000000001204074113200155215ustar00rootroot00000000000000Gnome-Pie-0.5.4/src/actions/action.vala000066400000000000000000000061341204074113200176470ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A base class for actions, which are executed when the user /// activates a pie's slice. ///////////////////////////////////////////////////////////////////////// public abstract class Action : GLib.Object { ///////////////////////////////////////////////////////////////////// /// The command which gets executed when user activates the Slice. /// It may be anything but has to be representable with a string. ///////////////////////////////////////////////////////////////////// public abstract string real_command { get; construct set; } ///////////////////////////////////////////////////////////////////// /// The command displayed to the user. It should be a bit more /// beautiful than the real_command. ///////////////////////////////////////////////////////////////////// public abstract string display_command { get; } ///////////////////////////////////////////////////////////////////// /// The name of the Action. ///////////////////////////////////////////////////////////////////// public virtual string name { get; set; } ///////////////////////////////////////////////////////////////////// /// The name of the icon of this Action. It should be in the users /// current icon theme. ///////////////////////////////////////////////////////////////////// public virtual string icon { get; set; } ///////////////////////////////////////////////////////////////////// /// True, if this Action is the quickAction of the associated Pie. /// The quickAction of a Pie gets executed when the users clicks on /// the center of a Pie. ///////////////////////////////////////////////////////////////////// public virtual bool is_quickaction { get; set; } ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all members. ///////////////////////////////////////////////////////////////////// public Action(string name, string icon, bool is_quickaction) { GLib.Object(name : name, icon : icon, is_quickaction : is_quickaction); } ///////////////////////////////////////////////////////////////////// /// This one is called, when the user activates the Slice. ///////////////////////////////////////////////////////////////////// public abstract void activate(); } } Gnome-Pie-0.5.4/src/actions/actionRegistry.vala000066400000000000000000000212341204074113200213760ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A which has knowledge on all possible acion types. ///////////////////////////////////////////////////////////////////////// public class ActionRegistry : GLib.Object { ///////////////////////////////////////////////////////////////////// /// A list containing all available Action types. ///////////////////////////////////////////////////////////////////// public static Gee.ArrayList types { get; private set; } ///////////////////////////////////////////////////////////////////// /// A map associating a displayable name for each Action, /// whether it has a custom icon and a name for the pies.conf /// file with it's type. ///////////////////////////////////////////////////////////////////// public static Gee.HashMap descriptions { get; private set; } ///////////////////////////////////////////////////////////////////// /// A helper class storing information on a Action type. ///////////////////////////////////////////////////////////////////// public class TypeDescription { public string name { get; set; default=""; } public string icon { get; set; default=""; } public string description { get; set; default=""; } public string id { get; set; default=""; } public bool icon_name_editable { get; set; default=false; } } ///////////////////////////////////////////////////////////////////// /// Registers all Action types. ///////////////////////////////////////////////////////////////////// public static void init() { types = new Gee.ArrayList(); descriptions = new Gee.HashMap(); TypeDescription type_description; types.add(typeof(AppAction).name()); type_description = AppAction.register(); descriptions.set(typeof(AppAction).name(), type_description); types.add(typeof(KeyAction).name()); type_description = KeyAction.register(); descriptions.set(typeof(KeyAction).name(), type_description); types.add(typeof(PieAction).name()); type_description = PieAction.register(); descriptions.set(typeof(PieAction).name(), type_description); types.add(typeof(UriAction).name()); type_description = UriAction.register(); descriptions.set(typeof(UriAction).name(), type_description); } ///////////////////////////////////////////////////////////////////// /// Creates a new Action from the given type name. ///////////////////////////////////////////////////////////////////// public static Action? create_action(string type_id, string name, string icon, string command, bool quickaction) { switch (type_id) { case "app": return new AppAction(name, icon, command, quickaction); case "key": return new KeyAction(name, icon, command, quickaction); case "uri": return new UriAction(name, icon, command, quickaction); case "pie": return new PieAction(command, quickaction); } return null; } ///////////////////////////////////////////////////////////////////// /// A helper method which creates an Action, appropriate for the /// given URI. This can result in an UriAction or in an AppAction, /// depending on the Type of the URI. ///////////////////////////////////////////////////////////////////// public static Action? new_for_uri(string uri, string? name = null) { var file = GLib.File.new_for_uri(uri); var scheme = file.get_uri_scheme(); string final_icon = ""; string final_name = file.get_basename(); switch (scheme) { case "application": var file_name = uri.split("//")[1]; var desktop_file = GLib.File.new_for_path("/usr/share/applications/" + file_name); if (desktop_file.query_exists()) return new_for_desktop_file(desktop_file.get_path()); break; case "trash": final_icon = "user-trash"; final_name = _("Trash"); break; case "http": case "https": final_icon = "www"; final_name = get_domain_name(uri); break; case "ftp": case "sftp": final_icon = "folder-remote"; final_name = get_domain_name(uri); break; default: try { var info = file.query_info("*", GLib.FileQueryInfoFlags.NONE); if (info.get_content_type() == "application/x-desktop") return new_for_desktop_file(file.get_parse_name()); // search for an appropriate icon var icon = info.get_icon(); final_icon = Icon.get_icon_name(icon); } catch (GLib.Error e) { warning(e.message); } break; } if (!Gtk.IconTheme.get_default().has_icon(final_icon)) final_icon = "stock_unknown"; if (name != null) final_name = name; return new UriAction(final_name, final_icon, uri); } ///////////////////////////////////////////////////////////////////// /// A helper method which creates an AppAction for given AppInfo. ///////////////////////////////////////////////////////////////////// public static Action? new_for_app_info(GLib.AppInfo info) { // get icon var icon = info.get_icon(); return new AppAction(info.get_display_name(), Icon.get_icon_name(icon), info.get_commandline()); } ///////////////////////////////////////////////////////////////////// /// A helper method which creates an AppAction for given *.desktop /// file. ///////////////////////////////////////////////////////////////////// public static Action? new_for_desktop_file(string file_name) { // check whether its a desktop file to open one of Gnome-Pie's pies if (file_name.has_prefix(Paths.launchers)) { string id = file_name.substring((long)file_name.length - 11, 3); return new PieAction(id); } var info = new DesktopAppInfo.from_filename(file_name); return new_for_app_info(info); } ///////////////////////////////////////////////////////////////////// /// A helper method which creates an AppAction for given mime type. ///////////////////////////////////////////////////////////////////// public static Action? default_for_mime_type(string type) { var info = AppInfo.get_default_for_type(type, false); return new_for_app_info(info); } ///////////////////////////////////////////////////////////////////// /// A helper method which creates an AppAction for given uri scheme. ///////////////////////////////////////////////////////////////////// public static Action? default_for_uri(string uri) { var info = AppInfo.get_default_for_uri_scheme(uri); return new_for_app_info(info); } ///////////////////////////////////////////////////////////////////// /// Returns for example www.google.com when http://www.google.de/?q=h /// is given. ///////////////////////////////////////////////////////////////////// private static string get_domain_name(string url) { int domain_end = url.index_of_char('/', 7); int domain_begin = url.index_of_char('/', 0) + 2; if (domain_begin < domain_end) return url.substring(domain_begin, domain_end-domain_begin); return url; } } } Gnome-Pie-0.5.4/src/actions/appAction.vala000066400000000000000000000060521204074113200203070ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// This type of Action launches an application or a custom command. ///////////////////////////////////////////////////////////////////////// public class AppAction : Action { ///////////////////////////////////////////////////////////////////// /// Used to register this type of Action. It sets the display name /// for this Action, whether it has a custom Icon/Name and the string /// used in the pies.conf file for this kind of Actions. ///////////////////////////////////////////////////////////////////// public static ActionRegistry.TypeDescription register() { var description = new ActionRegistry.TypeDescription(); description.name = _("Launch application"); description.icon = "application-x-executable"; description.description = _("Executes the given command."); description.icon_name_editable = true; description.id = "app"; return description; } ///////////////////////////////////////////////////////////////////// /// Stores the command line. ///////////////////////////////////////////////////////////////////// public override string real_command { get; construct set; } ///////////////////////////////////////////////////////////////////// /// Simply returns the real_command. No beautification. ///////////////////////////////////////////////////////////////////// public override string display_command { get {return real_command;} } ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all members. ///////////////////////////////////////////////////////////////////// public AppAction(string name, string icon, string command, bool is_quickaction = false) { GLib.Object(name : name, icon : icon, real_command : command, is_quickaction : is_quickaction); } ///////////////////////////////////////////////////////////////////// /// Launches the desired command. ///////////////////////////////////////////////////////////////////// public override void activate() { try{ var item = GLib.AppInfo.create_from_commandline(this.real_command, null, GLib.AppInfoCreateFlags.NONE); item.launch(null, null); } catch (Error e) { warning(e.message); } } } } Gnome-Pie-0.5.4/src/actions/keyAction.vala000066400000000000000000000062611204074113200203210ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// This type of Action "presses" a key stroke. ///////////////////////////////////////////////////////////////////////// public class KeyAction : Action { ///////////////////////////////////////////////////////////////////// /// Used to register this type of Action. It sets the display name /// for this Action, whether it has a custom Icon/Name and the string /// used in the pies.conf file for this kind of Actions. ///////////////////////////////////////////////////////////////////// public static ActionRegistry.TypeDescription register() { var description = new ActionRegistry.TypeDescription(); description.name = _("Press hotkey"); description.icon = "preferences-desktop-keyboard-shortcuts"; description.description = _("Simulates the activation of a hotkey."); description.icon_name_editable = true; description.id = "key"; return description; } ///////////////////////////////////////////////////////////////////// /// Stores the accelerator of this action. ///////////////////////////////////////////////////////////////////// public override string real_command { get; construct set; } ///////////////////////////////////////////////////////////////////// /// Returns a human readable form of the accelerator. ///////////////////////////////////////////////////////////////////// public override string display_command { get {return key.label;} } ///////////////////////////////////////////////////////////////////// /// The simulated key which gets 'pressed' on execution. ///////////////////////////////////////////////////////////////////// public Key key { get; set; } ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all members. ///////////////////////////////////////////////////////////////////// public KeyAction(string name, string icon, string command, bool is_quickaction = false) { GLib.Object(name : name, icon : icon, real_command : command, is_quickaction : is_quickaction); } construct { this.key = new Key.from_string(real_command); } ///////////////////////////////////////////////////////////////////// /// Presses the desired key. ///////////////////////////////////////////////////////////////////// public override void activate() { key.press(); } } } Gnome-Pie-0.5.4/src/actions/pieAction.vala000066400000000000000000000074261204074113200203120ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// This Action opens another pie. ///////////////////////////////////////////////////////////////////////// public class PieAction : Action { ///////////////////////////////////////////////////////////////////// /// Used to register this type of Action. It sets the display name /// for this Action, whether it has a custom Icon/Name and the string /// used in the pies.conf file for this kind of Actions. ///////////////////////////////////////////////////////////////////// public static ActionRegistry.TypeDescription register() { var description = new ActionRegistry.TypeDescription(); description.name = _("Open Pie"); description.icon = "gnome-pie"; description.description = _("Opens another Pie of Gnome-Pie. You may create sub menus this way."); description.icon_name_editable = false; description.id = "pie"; return description; } ///////////////////////////////////////////////////////////////////// /// Stores the ID of the referenced Pie. ///////////////////////////////////////////////////////////////////// public override string real_command { get; construct set; } ///////////////////////////////////////////////////////////////////// /// Returns the name of the referenced Pie. ///////////////////////////////////////////////////////////////////// public override string display_command { get {return name;} } ///////////////////////////////////////////////////////////////////// /// Returns the name of the referenced Pie. ///////////////////////////////////////////////////////////////////// public override string name { get { var referee = PieManager.all_pies[real_command]; if (referee != null) { owned_name = "↪" + referee.name; return owned_name; } return ""; } protected set {} } private string owned_name; ///////////////////////////////////////////////////////////////////// /// Returns the icon of the referenced Pie. ///////////////////////////////////////////////////////////////////// public override string icon { get { var referee = PieManager.all_pies[real_command]; if (referee != null) return referee.icon; return ""; } protected set {} } ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all members. ///////////////////////////////////////////////////////////////////// public PieAction(string id, bool is_quickaction = false) { GLib.Object(name : "", icon : "", real_command : id, is_quickaction : is_quickaction); } ///////////////////////////////////////////////////////////////////// /// Opens the desired Pie. ///////////////////////////////////////////////////////////////////// public override void activate() { PieManager.open_pie(real_command, true); } } } Gnome-Pie-0.5.4/src/actions/sigAction.vala000066400000000000000000000047051204074113200203140ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// This type of Action can't be selected by the user, therefore there is /// no register() method for this class. But it may be useful for /// ActionGroups: It emits a signal on activation. ///////////////////////////////////////////////////////////////////////// public class SigAction : Action { ///////////////////////////////////////////////////////////////////// /// This signal is emitted on activation. ///////////////////////////////////////////////////////////////////// public signal void activated(); ///////////////////////////////////////////////////////////////////// /// This may store something useful. ///////////////////////////////////////////////////////////////////// public override string real_command { get; construct set; } ///////////////////////////////////////////////////////////////////// /// Only for inheritance... Greetings to Liskov. ///////////////////////////////////////////////////////////////////// public override string display_command { get {return real_command;} } ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all members. ///////////////////////////////////////////////////////////////////// public SigAction(string name, string icon, string command, bool is_quickaction = false) { GLib.Object(name : name, icon : icon, real_command : command, is_quickaction : is_quickaction); } ///////////////////////////////////////////////////////////////////// /// Emits the signal on activation. ///////////////////////////////////////////////////////////////////// public override void activate() { this.activated(); } } } Gnome-Pie-0.5.4/src/actions/uriAction.vala000066400000000000000000000061211204074113200203230ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// This type of Action opens the default application for an URI. ///////////////////////////////////////////////////////////////////////// public class UriAction : Action { ///////////////////////////////////////////////////////////////////// /// Used to register this type of Action. It sets the display name /// for this Action, whether it has a custom Icon/Name and the string /// used in the pies.conf file for this kind of Actions. ///////////////////////////////////////////////////////////////////// public static ActionRegistry.TypeDescription register() { var description = new ActionRegistry.TypeDescription(); description.name = _("Open URI"); description.icon = "web-browser"; description.description = _("Opens a given location. You may use URL's or files paths."); description.icon_name_editable = true; description.id = "uri"; return description; } ///////////////////////////////////////////////////////////////////// /// The URI of this Action. ///////////////////////////////////////////////////////////////////// public override string real_command { get; construct set; } ///////////////////////////////////////////////////////////////////// /// Returns only the real URI. An URI can't be beautified. ///////////////////////////////////////////////////////////////////// public override string display_command { get {return real_command;} } ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all members. ///////////////////////////////////////////////////////////////////// public UriAction(string name, string icon, string command, bool is_quickaction = false) { GLib.Object(name : name, icon : icon, real_command : command.has_prefix("www") ? "http://" + command : command, is_quickaction : is_quickaction); } ///////////////////////////////////////////////////////////////////// /// Opens the default application for the URI. ///////////////////////////////////////////////////////////////////// public override void activate() { try{ GLib.AppInfo.launch_default_for_uri(real_command, null); } catch (Error e) { warning(e.message); } } } } Gnome-Pie-0.5.4/src/deamon.vala000066400000000000000000000144141204074113200161750ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// This class runs in the background. It has an Indicator sitting in the /// user's panel. It initializes everything and guarantees that there is /// only one instance of Gnome-Pie running. ///////////////////////////////////////////////////////////////////////// public class Deamon : GLib.Object { ///////////////////////////////////////////////////////////////////// /// The current version of Gnome-Pie ///////////////////////////////////////////////////////////////////// public static string version; ///////////////////////////////////////////////////////////////////// /// The beginning of everything. ///////////////////////////////////////////////////////////////////// public static int main(string[] args) { version = "0.5.4"; Logger.init(); Gdk.threads_init(); Gtk.init(ref args); Paths.init(); message("Welcome to Gnome-Pie " + version + "!"); // create the Deamon and run it var deamon = new GnomePie.Deamon(); deamon.run(args); return 0; } ///////////////////////////////////////////////////////////////////// /// The AppIndicator of Gnome-Pie. ///////////////////////////////////////////////////////////////////// private Indicator indicator = null; ///////////////////////////////////////////////////////////////////// /// Varaibles set by the commend line parser. ///////////////////////////////////////////////////////////////////// private static string open_pie = null; private static bool reset = false; ///////////////////////////////////////////////////////////////////// /// Available command line options. ///////////////////////////////////////////////////////////////////// private const GLib.OptionEntry[] options = { { "open", 'o', 0, GLib.OptionArg.STRING, out open_pie, "Open the Pie with the given ID", "ID" }, { "reset", 'r', 0, GLib.OptionArg.NONE, out reset, "Reset all options to default values" }, { null } }; ///////////////////////////////////////////////////////////////////// /// C'tor of the Deamon. It checks whether it's the firts running /// instance of Gnome-Pie. ///////////////////////////////////////////////////////////////////// public void run(string[] args) { // create command line options var context = new GLib.OptionContext(""); context.set_help_enabled(true); context.add_main_entries(options, null); context.add_group(Gtk.get_option_group (false)); try { context.parse(ref args); } catch(GLib.OptionError error) { warning(error.message); } if (this.reset) { if (GLib.FileUtils.remove(Paths.pie_config) == 0) message("Removed file \"%s\"", Paths.pie_config); if (GLib.FileUtils.remove(Paths.settings) == 0) message("Removed file \"%s\"", Paths.settings); return; } // create unique application var app = new Unique.App("org.gnome.gnomepie", null); #if HAVE_GTK_3 if (app.is_running()) { #else if (app.is_running) { #endif // 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; } // wait for incoming messages app.message_received.connect((cmd, data, event_time) => { if (cmd == Unique.Command.ACTIVATE) { var pie = data.get_text(); if (pie != null && pie != "") PieManager.open_pie(pie); else this.indicator.show_preferences(); return Unique.Response.OK; } return Unique.Response.PASSTHROUGH; }); Gdk.threads_enter(); // init locale support Intl.bindtextdomain ("gnomepie", Paths.locales); Intl.textdomain ("gnomepie"); // init toolkits and static stuff ActionRegistry.init(); GroupRegistry.init(); PieManager.init(); Icon.init(); // launch the indicator this.indicator = new Indicator(); // connect SigHandlers Posix.signal(Posix.SIGINT, sig_handler); Posix.signal(Posix.SIGTERM, sig_handler); // finished loading... so run the prog! message("Started happily..."); // open pie if neccessary if (open_pie != null) PieManager.open_pie(open_pie); Gtk.main(); Gdk.threads_leave(); } ///////////////////////////////////////////////////////////////////// /// Print a nifty message when the prog is killed. ///////////////////////////////////////////////////////////////////// private static void sig_handler(int sig) { stdout.printf("\n"); message("Caught signal (%d), bye!".printf(sig)); Gtk.main_quit(); } } } Gnome-Pie-0.5.4/src/gui/000077500000000000000000000000001204074113200146455ustar00rootroot00000000000000Gnome-Pie-0.5.4/src/gui/aboutWindow.vala000066400000000000000000000055451204074113200200250ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A simple about dialog. ///////////////////////////////////////////////////////////////////////// public class AboutWindow: Gtk.AboutDialog { ///////////////////////////////////////////////////////////////////// /// C'tor, creates a new about dialog. The entries are sorted alpha- /// betically. ///////////////////////////////////////////////////////////////////// public AboutWindow () { string[] devs = { "Simon Schneegans ", "Francesco Piccinno " }; string[] artists = { "Simon Schneegans " }; string[] translators = { "Simon Schneegans (DE, EN)", "Riccardo Traverso (IT)", "Magnun Leno (PT-BR)", "Kim Boram (KO)", "Eduardo Anabalon (ES)", "Grégoire Bellon-Gervais (FR)", "Alex Maxime (FR)", "Eugene Roskin (RU)", "Ting Zhou (ZH-CN)", "Martin Dinov (BG)" }; // sort translators GLib.List translator_list = new GLib.List(); 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-2012 Simon Schneegans ", 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: Deamon.version ); } } } Gnome-Pie-0.5.4/src/gui/iconSelectWindow.vala000066400000000000000000000447721204074113200210100ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A window which allows selection of an Icon of the user's current icon /// 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 : GLib.Object { ///////////////////////////////////////////////////////////////////// /// This signal gets emitted when the user selects a new icon. ///////////////////////////////////////////////////////////////////// public signal void on_ok(string icon_name); ///////////////////////////////////////////////////////////////////// /// Stores the currently selected icon. ///////////////////////////////////////////////////////////////////// private string active_icon = ""; ///////////////////////////////////////////////////////////////////// /// 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; ///////////////////////////////////////////////////////////////////// /// The main window. ///////////////////////////////////////////////////////////////////// private Gtk.Window window = 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 load_queue; ///////////////////////////////////////////////////////////////////// /// Possible icon types. ///////////////////////////////////////////////////////////////////// private enum IconContext { ALL, APPS, ACTIONS, PLACES, FILES, EMOTES, OTHER } ///////////////////////////////////////////////////////////////////// /// C'tor, creates a new IconSelectWindow. ///////////////////////////////////////////////////////////////////// public IconSelectWindow(Gtk.Window parent) { try { this.load_queue = new GLib.AsyncQueue(); if (this.icon_list == null) { 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.window.visible) load_icons(); else need_reload = true; }); } // make the icon_view filterable this.icon_list_filtered = new Gtk.TreeModelFilter(this.icon_list, null); Gtk.Builder builder = new Gtk.Builder(); builder.add_from_file (Paths.ui_files + "/icon_select.ui"); this.window = builder.get_object("window") as Gtk.Window; this.window.set_transient_for(parent); this.window.set_modal(true); this.tabs = builder.get_object("tabs") as Gtk.Notebook; this.spinner = builder.get_object("spinner") as Gtk.Spinner; this.spinner.start(); (builder.get_object("ok-button") as Gtk.Button).clicked.connect(on_ok_button_clicked); (builder.get_object("cancel-button") as Gtk.Button).clicked.connect(on_cancel_button_clicked); var combo_box = builder.get_object("combo-box") as Gtk.VBox; // context combo #if HAVE_GTK_3 var context_combo = new Gtk.ComboBoxText(); #else var context_combo = new Gtk.ComboBox.text(); #endif context_combo.append_text(_("All icons")); context_combo.append_text(_("Applications")); context_combo.append_text(_("Actions")); context_combo.append_text(_("Places")); context_combo.append_text(_("File types")); context_combo.append_text(_("Emotes")); context_combo.append_text(_("Miscellaneous")); context_combo.set_active(0); context_combo.changed.connect(() => { this.icon_list_filtered.refilter(); }); combo_box.pack_start(context_combo, false, false); // string filter entry var filter = builder.get_object("filter-entry") as Gtk.Entry; // 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; model.get(iter, 0, out name); model.get(iter, 1, out context); if (name == null) return false; return (context_combo.get_active() == context || context_combo.get_active() == IconContext.ALL) && 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 = builder.get_object("icon-scrolledwindow") as Gtk.ScrolledWindow; // 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 = 2; 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); 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); this.icon_list_filtered.get(iter, 0, out this.active_icon); this.on_ok(this.active_icon); this.window.hide(); }); scroll.add(this.icon_view); // file chooser widget this.file_chooser = builder.get_object("filechooser") as Gtk.FileChooserWidget; var file_filter = new Gtk.FileFilter(); file_filter.add_pixbuf_formats(); #if HAVE_GTK_3 file_filter.set_filter_name(_("All supported image formats")); #else file_filter.set_name(_("All supported image formats")); #endif 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)) 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_ok(this.active_icon); this.window.hide(); }); this.window.set_focus(this.icon_view); this.window.delete_event.connect(this.window.hide_on_delete); } catch (GLib.Error e) { error("Could not load UI: %s\n", e.message); } } ///////////////////////////////////////////////////////////////////// /// Displays the window. The icons are reloaded if neccessary. ///////////////////////////////////////////////////////////////////// public void show() { this.window.show_all(); this.spinner.hide(); if (this.need_reload) { this.need_reload = false; this.load_icons(); } } public static void clear_icons() { if (icon_list != null) { need_reload = true; icon_list.clear(); } } ///////////////////////////////////////////////////////////////////// /// Makes the window select the icon of the given Pie. ///////////////////////////////////////////////////////////////////// public void set_icon(string icon) { this.active_icon = icon; if (icon.contains("/")) { this.file_chooser.set_filename(icon); this.tabs.set_current_page(1); } else { this.icon_list_filtered.foreach((model, path, iter) => { string name = ""; model.get(iter, 0, out name); if (name == icon) { this.icon_view.select_path(path); this.icon_view.scroll_to_path(path, true, 0.5f, 0.0f); this.icon_view.set_cursor(path, null, false); } return (name == icon); }); this.tabs.set_current_page(0); } } ///////////////////////////////////////////////////////////////////// /// Called when the user clicks the ok button. ///////////////////////////////////////////////////////////////////// private void on_ok_button_clicked() { this.on_ok(this.active_icon); this.window.hide(); } ///////////////////////////////////////////////////////////////////// /// Called when the user clicks the cancel button. ///////////////////////////////////////////////////////////////////// private void on_cancel_button_clicked() { this.window.hide(); } ///////////////////////////////////////////////////////////////////// /// (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); this.load_all.begin(); // insert loaded icons every 200 ms Timeout.add(200, () => { while (this.load_queue.length() > 0) { var new_entry = this.load_queue.pop(); Gtk.TreeIter current; icon_list.append(out current); icon_list.set(current, 0, new_entry.name, 1, new_entry.context, 2, new_entry.pixbuf); } // enable sorting of the icon_view if loading finished if (!this.loading) { icon_list.set_sort_column_id(0, Gtk.SortType.ASCENDING); } return loading; }); } } ///////////////////////////////////////////////////////////////////// /// Loads all icons of an icon theme and pushes them into the /// load_queue. ///////////////////////////////////////////////////////////////////// private async void load_all() { var icon_theme = Gtk.IconTheme.get_default(); foreach (var context in icon_theme.list_contexts()) { if (!disabled_contexts.contains(context)) { foreach (var icon in icon_theme.list_icons(context)) { IconContext icon_context = IconContext.OTHER; switch(context) { case "Apps": case "Applications": icon_context = IconContext.APPS; break; case "Emotes": icon_context = IconContext.EMOTES; break; case "Places": case "Devices": icon_context = IconContext.PLACES; break; case "Mimetypes": icon_context = IconContext.FILES; break; case "Actions": icon_context = IconContext.ACTIONS; break; default: break; } Idle.add(load_all.callback); yield; try { // create a new entry for the queue var new_entry = new ListEntry(); new_entry.name = icon; new_entry.context = icon_context; new_entry.pixbuf = icon_theme.load_icon(icon, 32, 0); // some icons have only weird sizes... do not include them if (new_entry.pixbuf.width == 32) this.load_queue.push(new_entry); } catch (GLib.Error e) { warning("Failed to load image " + icon); } } } } // finished loading this.loading = false; // hide the spinner if (spinner != null) spinner.visible = false; } } } Gnome-Pie-0.5.4/src/gui/indicator.vala000066400000000000000000000134351204074113200174740ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// An appindicator sitting in the panel. It owns the settings menu. ///////////////////////////////////////////////////////////////////////// public class Indicator : GLib.Object { ///////////////////////////////////////////////////////////////////// /// The internally used indicator. ///////////////////////////////////////////////////////////////////// #if HAVE_APPINDICATOR private AppIndicator.Indicator indicator { private get; private set; } #else private Gtk.StatusIcon indicator {private get; private set; } private Gtk.Menu menu {private get; private set; } #endif ///////////////////////////////////////////////////////////////////// /// The Preferences Menu of Gnome-Pie. ///////////////////////////////////////////////////////////////////// private PreferencesWindow prefs { private get; private set; } ///////////////////////////////////////////////////////////////////// /// Returns true, when the indicator is currently visible. ///////////////////////////////////////////////////////////////////// public bool active { get { #if HAVE_APPINDICATOR return indicator.get_status() == AppIndicator.IndicatorStatus.ACTIVE; #else return indicator.get_visible(); #endif } set { #if HAVE_APPINDICATOR if (value) indicator.set_status(AppIndicator.IndicatorStatus.ACTIVE); else indicator.set_status(AppIndicator.IndicatorStatus.PASSIVE); #else indicator.set_visible(value); #endif } } ///////////////////////////////////////////////////////////////////// /// C'tor, constructs a new Indicator, residing in the user's panel. ///////////////////////////////////////////////////////////////////// public Indicator() { string icon = ""; #if HAVE_GTK_3 if (Gdk.X11Screen.get_window_manager_name(Gdk.Screen.get_default()) == "Mutter") #else if (Gdk.x11_screen_get_window_manager_name(Gdk.Screen.get_default()) == "Mutter") #endif icon = "gnome-pie"; else icon = "gnome-pie-symbolic"; #if HAVE_APPINDICATOR string path = ""; try { path = GLib.Path.get_dirname(GLib.FileUtils.read_link("/proc/self/exe"))+"/resources"; } catch (GLib.FileError e) { warning("Failed to get path of executable!"); } this.indicator = new AppIndicator.Indicator.with_path("Gnome-Pie", icon, AppIndicator.IndicatorCategory.APPLICATION_STATUS, path); var menu = new Gtk.Menu(); #else this.indicator = new Gtk.StatusIcon(); try { var file = GLib.File.new_for_path(GLib.Path.build_filename( GLib.Path.get_dirname(GLib.FileUtils.read_link("/proc/self/exe"))+"/resources", icon + ".svg" )); if (!file.query_exists()) this.indicator.set_from_icon_name(icon); else this.indicator.set_from_file(file.get_path()); } catch (GLib.FileError e) { warning("Failed to get path of executable!"); this.indicator.set_from_icon_name(icon); } this.menu = new Gtk.Menu(); var menu = this.menu; #endif this.prefs = new PreferencesWindow(); // preferences item var item = new Gtk.ImageMenuItem.from_stock (Gtk.Stock.PREFERENCES, null); item.activate.connect(() => { this.prefs.show(); }); item.show(); menu.append(item); // about item item = new Gtk.ImageMenuItem.from_stock (Gtk.Stock.ABOUT, null); item.show(); item.activate.connect(() => { var about = new AboutWindow(); about.run(); about.destroy(); }); menu.append(item); // separator var sepa = new Gtk.SeparatorMenuItem(); sepa.show(); menu.append(sepa); // quit item item = new Gtk.ImageMenuItem.from_stock(Gtk.Stock.QUIT, null); item.activate.connect(Gtk.main_quit); item.show(); menu.append(item); #if HAVE_APPINDICATOR this.indicator.set_menu(menu); #else this.indicator.popup_menu.connect((btn, time) => { this.menu.popup(null, null, null, btn, time); }); #endif this.active = Config.global.show_indicator; Config.global.notify["show-indicator"].connect((s, p) => { this.active = Config.global.show_indicator; }); } ///////////////////////////////////////////////////////////////////// /// Shows the preferences menu. ///////////////////////////////////////////////////////////////////// public void show_preferences() { this.prefs.show(); } } } Gnome-Pie-0.5.4/src/gui/newSliceWindow.vala000066400000000000000000000416051204074113200204610ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A window which allows selection of a new Slice which is about to be /// added to a Pie. It can be also used to edit an existing Slice ///////////////////////////////////////////////////////////////////////// public class NewSliceWindow : GLib.Object { ///////////////////////////////////////////////////////////////////// /// This signal gets emitted when the user confirms his selection. ///////////////////////////////////////////////////////////////////// public signal void on_select(ActionGroup action, bool as_new_slice, int at_position); ///////////////////////////////////////////////////////////////////// /// The contained list of slice types. It contains both: Groups and /// single actions. ///////////////////////////////////////////////////////////////////// private SliceTypeList slice_type_list = null; ///////////////////////////////////////////////////////////////////// /// The IconSelectWindow used for icon selection for a Slice. ///////////////////////////////////////////////////////////////////// private IconSelectWindow? icon_window = null; ///////////////////////////////////////////////////////////////////// /// Some widgets of this window. Loaded by a ui-builder and stored /// for later access. ///////////////////////////////////////////////////////////////////// private Gtk.Dialog window = null; private Gtk.HBox name_box = null; private Gtk.HBox command_box = null; private Gtk.Button icon_button = null; private Gtk.VBox no_options_box = null; private Gtk.HBox pie_box = null; private Gtk.HBox hotkey_box = null; private Gtk.HBox uri_box = null; private Gtk.HBox quickaction_box = null; private Gtk.Image icon = null; private Gtk.Entry name_entry = null; private Gtk.Entry command_entry = null; private Gtk.Entry uri_entry = null; private Gtk.CheckButton quickaction_checkbutton = null; ///////////////////////////////////////////////////////////////////// /// Two custom widgets. For Pie and hotkey selection respectively. ///////////////////////////////////////////////////////////////////// private PieComboList pie_select = null; private TriggerSelectButton key_select = null; ///////////////////////////////////////////////////////////////////// /// These members store information on the currently selected Slice. ///////////////////////////////////////////////////////////////////// private string current_type = ""; private string current_icon = ""; private string current_id = ""; private string current_custom_icon = ""; private string current_hotkey = ""; private string current_pie_to_open = ""; ///////////////////////////////////////////////////////////////////// /// The position of the edited Slice in its parent Pie. ///////////////////////////////////////////////////////////////////// private int slice_position = 0; ///////////////////////////////////////////////////////////////////// /// True, if the Slice i going to be added as a new Slice. Else it /// will edit the Slice at slice_position in its parent Pie. ///////////////////////////////////////////////////////////////////// private bool add_as_new_slice = true; ///////////////////////////////////////////////////////////////////// /// C'tor creates a new window. ///////////////////////////////////////////////////////////////////// public NewSliceWindow() { try { Gtk.Builder builder = new Gtk.Builder(); builder.add_from_file (Paths.ui_files + "/slice_select.ui"); this.slice_type_list = new SliceTypeList(); this.slice_type_list.on_select.connect((type, icon) => { this.name_box.hide(); this.command_box.hide(); this.icon_button.sensitive = false; this.no_options_box.hide(); this.pie_box.hide(); this.hotkey_box.hide(); this.uri_box.hide(); this.quickaction_box.hide(); this.current_type = type; switch (type) { case "bookmarks": case "clipboard": case "devices": case "menu": case "session": case "window_list": this.no_options_box.show(); this.set_icon(icon); break; case "app": this.name_box.show(); this.command_box.show(); this.quickaction_box.show(); this.icon_button.sensitive = true; if (this.current_custom_icon == "") this.set_icon(icon); else this.set_icon(this.current_custom_icon); break; case "key": this.name_box.show(); this.hotkey_box.show(); this.quickaction_box.show(); this.icon_button.sensitive = true; if (this.current_custom_icon == "") this.set_icon(icon); else this.set_icon(this.current_custom_icon); break; case "pie": this.pie_box.show(); this.quickaction_box.show(); this.set_icon(PieManager.all_pies[this.pie_select.current_id].icon); break; case "uri": this.name_box.show(); this.uri_box.show(); this.quickaction_box.show(); this.icon_button.sensitive = true; if (this.current_custom_icon == "") this.set_icon(icon); else this.set_icon(this.current_custom_icon); break; } }); this.name_box = builder.get_object("name-box") as Gtk.HBox; this.command_box = builder.get_object("command-box") as Gtk.HBox; this.icon_button = builder.get_object("icon-button") as Gtk.Button; this.no_options_box = builder.get_object("no-options-box") as Gtk.VBox; this.pie_box = builder.get_object("pie-box") as Gtk.HBox; this.pie_select = new PieComboList(); this.pie_select.on_select.connect((id) => { this.current_pie_to_open = id; this.set_icon(PieManager.all_pies[id].icon); }); this.pie_box.pack_start(this.pie_select, true, true); this.hotkey_box = builder.get_object("hotkey-box") as Gtk.HBox; this.key_select = new TriggerSelectButton(false); this.hotkey_box.pack_start(this.key_select, false, true); this.key_select.on_select.connect((trigger) => { this.current_hotkey = trigger.name; }); this.uri_box = builder.get_object("uri-box") as Gtk.HBox; this.name_entry = builder.get_object("name-entry") as Gtk.Entry; this.uri_entry = builder.get_object("uri-entry") as Gtk.Entry; this.command_entry = builder.get_object("command-entry") as Gtk.Entry; this.quickaction_checkbutton = builder.get_object("quick-action-checkbutton") as Gtk.CheckButton; this.quickaction_box = builder.get_object("quickaction-box") as Gtk.HBox; this.icon = builder.get_object("icon") as Gtk.Image; this.icon_button.clicked.connect(on_icon_button_clicked); var scroll_area = builder.get_object("slice-scrolledwindow") as Gtk.ScrolledWindow; scroll_area.add(this.slice_type_list); this.window = builder.get_object("window") as Gtk.Dialog; (builder.get_object("ok-button") as Gtk.Button).clicked.connect(on_ok_button_clicked); (builder.get_object("cancel-button") as Gtk.Button).clicked.connect(on_cancel_button_clicked); this.window.delete_event.connect(this.window.hide_on_delete); } catch (GLib.Error e) { error("Could not load UI: %s\n", e.message); } } ///////////////////////////////////////////////////////////////////// /// Sets the parent window, in order to make this window stay in /// front. ///////////////////////////////////////////////////////////////////// public void set_parent(Gtk.Window parent) { this.window.set_transient_for(parent); } ///////////////////////////////////////////////////////////////////// /// Sows the window on the screen. ///////////////////////////////////////////////////////////////////// public void show() { this.slice_type_list.select_first(); this.pie_select.select_first(); this.key_select.set_trigger(new Trigger()); this.window.show_all(); } ///////////////////////////////////////////////////////////////////// /// Reloads the window. ///////////////////////////////////////////////////////////////////// public void reload() { this.pie_select.reload(); } ///////////////////////////////////////////////////////////////////// /// Makes all widgets display stuff according to the given action. ///////////////////////////////////////////////////////////////////// public void set_action(ActionGroup group, int position) { this.set_default(group.parent_id, position); this.add_as_new_slice = false; string type = ""; if (group.get_type().depth() == 2) { var action = group.actions[0]; type = ActionRegistry.descriptions[action.get_type().name()].id; this.select_type(type); this.set_icon(action.icon); this.quickaction_checkbutton.active = action.is_quickaction; this.name_entry.text = action.name; switch (type) { case "app": this.current_custom_icon = action.icon; this.command_entry.text = action.real_command; break; case "key": this.current_custom_icon = action.icon; this.current_hotkey = action.real_command; this.key_select.set_trigger(new Trigger.from_string(action.real_command)); break; case "pie": this.pie_select.select(action.real_command); break; case "uri": this.current_custom_icon = action.icon; this.uri_entry.text = action.real_command; break; } } else { type = GroupRegistry.descriptions[group.get_type().name()].id; this.select_type(type); } } ///////////////////////////////////////////////////////////////////// /// Selects a default action. ///////////////////////////////////////////////////////////////////// public void set_default(string pie_id, int position) { this.slice_position = position; this.add_as_new_slice = true; this.current_custom_icon = ""; this.select_type("app"); this.current_id = pie_id; this.key_select.set_trigger(new Trigger()); this.pie_select.select_first(); this.name_entry.text = _("Rename me!"); this.command_entry.text = ""; this.uri_entry.text = ""; } ///////////////////////////////////////////////////////////////////// /// Selects a specific action type. ///////////////////////////////////////////////////////////////////// private void select_type(string type) { this.current_type = type; this.slice_type_list.select(type); } ///////////////////////////////////////////////////////////////////// /// Called, when the user presses the ok button. ///////////////////////////////////////////////////////////////////// private void on_ok_button_clicked() { this.window.hide(); ActionGroup group = null; switch (this.current_type) { case "bookmarks": group = new BookmarkGroup(this.current_id); break; case "clipboard": group = new ClipboardGroup(this.current_id); break; case "devices": group = new DevicesGroup(this.current_id); break; case "menu": group = new MenuGroup(this.current_id); break; case "session": group = new SessionGroup(this.current_id); break; case "window_list": group = new WindowListGroup(this.current_id); break; case "app": group = new ActionGroup(this.current_id); group.add_action(new AppAction(this.name_entry.text, this.current_icon, this.command_entry.text, this.quickaction_checkbutton.active)); break; case "key": group = new ActionGroup(this.current_id); group.add_action(new KeyAction(this.name_entry.text, this.current_icon, this.current_hotkey, this.quickaction_checkbutton.active)); break; case "pie": group = new ActionGroup(this.current_id); group.add_action(new PieAction(this.current_pie_to_open, this.quickaction_checkbutton.active)); break; case "uri": group = new ActionGroup(this.current_id); group.add_action(new UriAction(this.name_entry.text, this.current_icon, this.uri_entry.text, this.quickaction_checkbutton.active)); break; } this.on_select(group, this.add_as_new_slice, this.slice_position); } ///////////////////////////////////////////////////////////////////// /// Called when the user presses the cancel button. ///////////////////////////////////////////////////////////////////// private void on_cancel_button_clicked() { this.window.hide(); } ///////////////////////////////////////////////////////////////////// /// Called when the user presses the icon select button. ///////////////////////////////////////////////////////////////////// private void on_icon_button_clicked(Gtk.Button button) { if (this.icon_window == null) { this.icon_window = new IconSelectWindow(this.window); this.icon_window.on_ok.connect((icon) => { this.current_custom_icon = icon; this.set_icon(icon); }); } this.icon_window.show(); this.icon_window.set_icon(this.current_icon); } ///////////////////////////////////////////////////////////////////// /// Helper method which sets the icon of the icon select button. /// It assures that both can be displayed: A customly chosen image /// from or an icon from the current theme. ///////////////////////////////////////////////////////////////////// private void set_icon(string icon) { if (icon.contains("/")) try { this.icon.pixbuf = new Gdk.Pixbuf.from_file_at_scale(icon, this.icon.get_pixel_size(), this.icon.get_pixel_size(), true); } catch (GLib.Error error) { warning(error.message); } else this.icon.icon_name = icon; this.current_icon = icon; } } } Gnome-Pie-0.5.4/src/gui/newsWindow.vala000066400000000000000000000046321204074113200176630ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// ///////////////////////////////////////////////////////////////////////// public class NewsWindow: Gtk.Dialog { public static const int news_count = 2; ///////////////////////////////////////////////////////////////////// /// ///////////////////////////////////////////////////////////////////// public NewsWindow () { this.title = "Gnome-Pie"; this.set_border_width(5); var box = new Gtk.VBox(false, 12); var image = new Gtk.Image.from_icon_name("gnome-pie", Gtk.IconSize.DIALOG); box.pack_start(image); var news = new Gtk.Label(""); news.wrap = true; news.set_width_chars(75); news.set_markup("Thank you!\n\n"); box.pack_start(news, false, false); var check = new Gtk.CheckButton.with_label("Don't show this window again."); check.toggled.connect((check_box) => { var checky = check_box as Gtk.CheckButton; if (checky.active) Config.global.showed_news = news_count; else Config.global.showed_news = news_count-1; Config.global.save(); }); box.pack_end(check); (this.get_content_area() as Gtk.VBox).pack_start(box); this.get_content_area().show_all(); this.add_button(Gtk.Stock.CLOSE, 0); this.response.connect((id) => { if (id == 0) this.hide(); }); } } } Gnome-Pie-0.5.4/src/gui/pieComboList.vala000066400000000000000000000124011204074113200201010ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A drop-down list, containing one entry for each existing Pie. ///////////////////////////////////////////////////////////////////////// class PieComboList : Gtk.ComboBox { ///////////////////////////////////////////////////////////////////// /// This signal gets emitted when the user selects a new Pie. ///////////////////////////////////////////////////////////////////// public signal void on_select(string id); ///////////////////////////////////////////////////////////////////// /// The currently selected row. ///////////////////////////////////////////////////////////////////// public string current_id { get; private set; default=""; } ///////////////////////////////////////////////////////////////////// /// Stores the data internally. ///////////////////////////////////////////////////////////////////// private Gtk.ListStore data; private enum DataPos {ICON, NAME, ID} ///////////////////////////////////////////////////////////////////// /// C'tor, constructs the Widget. ///////////////////////////////////////////////////////////////////// public PieComboList() { GLib.Object(); this.data = new Gtk.ListStore(3, typeof(Gdk.Pixbuf), typeof(string), typeof(string)); this.data.set_sort_column_id(1, Gtk.SortType.ASCENDING); base.set_model(this.data); var icon_render = new Gtk.CellRendererPixbuf(); icon_render.xpad = 4; this.pack_start(icon_render, false); var name_render = new Gtk.CellRendererText(); this.pack_start(name_render, true); this.add_attribute(icon_render, "pixbuf", DataPos.ICON); this.add_attribute(name_render, "text", DataPos.NAME); this.changed.connect(() => { Gtk.TreeIter active; if (this.get_active_iter(out active)) { string id = ""; this.data.get(active, DataPos.ID, out id); this.on_select(id); this.current_id = id; } }); reload(); } ///////////////////////////////////////////////////////////////////// /// Loads all existing Pies to the list. ///////////////////////////////////////////////////////////////////// public void reload() { Gtk.TreeIter active; string id = ""; if (this.get_active_iter(out active)) this.data.get(active, DataPos.ID, out id); data.clear(); foreach (var pie in PieManager.all_pies.entries) { this.load_pie(pie.value); } select_first(); select(id); } ///////////////////////////////////////////////////////////////////// /// Selects the first Pie. ///////////////////////////////////////////////////////////////////// public void select_first() { Gtk.TreeIter active; if(this.data.get_iter_first(out active) ) { this.set_active_iter(active); string id = ""; this.data.get(active, DataPos.ID, out id); this.on_select(id); this.current_id = id; } else { this.on_select(""); this.current_id = ""; } } ///////////////////////////////////////////////////////////////////// /// Selects the Pie with the given ID. ///////////////////////////////////////////////////////////////////// public void select(string id) { this.data.foreach((model, path, iter) => { string pie_id; this.data.get(iter, DataPos.ID, out pie_id); if (id == pie_id) { this.set_active_iter(iter); return true; } return false; }); } ///////////////////////////////////////////////////////////////////// /// Loads one given pie to the list. ///////////////////////////////////////////////////////////////////// private void load_pie(Pie pie) { if (pie.id.length == 3) { Gtk.TreeIter last; this.data.append(out last); var icon = new Icon(pie.icon, 24); this.data.set(last, DataPos.ICON, icon.to_pixbuf(), DataPos.NAME, pie.name, DataPos.ID, pie.id); } } } } Gnome-Pie-0.5.4/src/gui/pieList.vala000066400000000000000000000241151204074113200171260ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A list, containing one entry for each existing Pie. ///////////////////////////////////////////////////////////////////////// class PieList : Gtk.TreeView { ///////////////////////////////////////////////////////////////////// /// This signal gets emitted when the user selects a new Pie. ///////////////////////////////////////////////////////////////////// public signal void on_select(string id); ///////////////////////////////////////////////////////////////////// /// Stores the data internally. ///////////////////////////////////////////////////////////////////// private Gtk.ListStore data; private enum DataPos {ICON, ICON_NAME, NAME, ID} ///////////////////////////////////////////////////////////////////// /// Stores where a drag startet. ///////////////////////////////////////////////////////////////////// private Gtk.TreeIter? drag_start = null; ///////////////////////////////////////////////////////////////////// /// Rembers the time when a last drag move event was reported. Used /// to avoid frequent changes of selected Pie when a Pie is dragged /// over this widget. ///////////////////////////////////////////////////////////////////// private uint last_hover = 0; ///////////////////////////////////////////////////////////////////// /// C'tor, constructs the Widget. ///////////////////////////////////////////////////////////////////// public PieList() { GLib.Object(); this.data = new Gtk.ListStore(4, typeof(Gdk.Pixbuf), typeof(string), typeof(string), typeof(string)); this.data.set_sort_column_id(DataPos.NAME, Gtk.SortType.ASCENDING); this.set_model(this.data); this.set_headers_visible(false); this.set_grid_lines(Gtk.TreeViewGridLines.NONE); this.width_request = 170; this.set_enable_search(false); this.set_events(Gdk.EventMask.POINTER_MOTION_MASK); var main_column = new Gtk.TreeViewColumn(); var icon_render = new Gtk.CellRendererPixbuf(); icon_render.xpad = 4; icon_render.ypad = 4; main_column.pack_start(icon_render, false); var name_render = new Gtk.CellRendererText(); name_render.ellipsize = Pango.EllipsizeMode.END; name_render.ellipsize_set = true; main_column.pack_start(name_render, true); base.append_column(main_column); main_column.add_attribute(icon_render, "pixbuf", DataPos.ICON); main_column.add_attribute(name_render, "text", DataPos.NAME); // setup drag'n'drop Gtk.TargetEntry uri_source = {"text/uri-list", 0, 0}; Gtk.TargetEntry[] entries = { uri_source }; this.enable_model_drag_source(Gdk.ModifierType.BUTTON1_MASK, entries, Gdk.DragAction.LINK); this.enable_model_drag_dest(entries, Gdk.DragAction.COPY | Gdk.DragAction.MOVE | Gdk.DragAction.LINK); this.drag_data_get.connect(this.on_dnd_source); this.drag_data_received.connect(this.on_dnd_received); this.drag_begin.connect_after(this.on_start_drag); this.drag_motion.connect(this.on_drag_move); this.drag_leave.connect(() => { this.last_hover = 0; }); this.get_selection().changed.connect(() => { Gtk.TreeIter active; if (this.get_selection().get_selected(null, out active)) { string id = ""; this.data.get(active, DataPos.ID, out id); this.on_select(id); } }); reload_all(); } ///////////////////////////////////////////////////////////////////// /// Loads all existing Pies to the list. ///////////////////////////////////////////////////////////////////// public void reload_all() { Gtk.TreeIter active; string id = ""; if (this.get_selection().get_selected(null, out active)) this.data.get(active, DataPos.ID, out id); data.clear(); foreach (var pie in PieManager.all_pies.entries) { this.load_pie(pie.value); } select(id); } ///////////////////////////////////////////////////////////////////// /// Selects the first Pie. ///////////////////////////////////////////////////////////////////// public void select_first() { Gtk.TreeIter active; if(this.data.get_iter_first(out active) ) { this.get_selection().select_iter(active); string id = ""; this.data.get(active, DataPos.ID, out id); this.on_select(id); } else { this.on_select(""); } } ///////////////////////////////////////////////////////////////////// /// Selects the Pie with the given ID. ///////////////////////////////////////////////////////////////////// public void select(string id) { this.data.foreach((model, path, iter) => { string pie_id; this.data.get(iter, DataPos.ID, out pie_id); if (id == pie_id) { this.get_selection().select_iter(iter); return true; } return false; }); } ///////////////////////////////////////////////////////////////////// /// Loads one given pie to the list. ///////////////////////////////////////////////////////////////////// private void load_pie(Pie pie) { if (pie.id.length == 3) { Gtk.TreeIter last; this.data.append(out last); var icon = new Icon(pie.icon, 24); this.data.set(last, DataPos.ICON, icon.to_pixbuf(), DataPos.ICON_NAME, pie.icon, DataPos.NAME, pie.name, DataPos.ID, pie.id); } } ///////////////////////////////////////////////////////////////////// /// Called when a drag which started on this Widget was successfull. ///////////////////////////////////////////////////////////////////// private void on_dnd_source(Gdk.DragContext context, Gtk.SelectionData selection_data, uint info, uint time_) { if (this.drag_start != null) { string id = ""; this.data.get(this.drag_start, DataPos.ID, out id); selection_data.set_uris({"file://" + Paths.launchers + "/" + id + ".desktop"}); } } ///////////////////////////////////////////////////////////////////// /// Called when a drag operation is started on this Widget. ///////////////////////////////////////////////////////////////////// private void on_start_drag(Gdk.DragContext ctx) { if (this.get_selection().get_selected(null, out this.drag_start)) { string icon_name = ""; this.data.get(this.drag_start, DataPos.ICON_NAME, out icon_name); var icon = new Icon(icon_name, 48); var pixbuf = icon.to_pixbuf(); Gtk.drag_set_icon_pixbuf(ctx, pixbuf, icon.size()/2, icon.size()/2); } } ///////////////////////////////////////////////////////////////////// /// Called when something is dragged over this Widget. ///////////////////////////////////////////////////////////////////// private bool on_drag_move(Gdk.DragContext context, int x, int y, uint time) { Gtk.TreeViewDropPosition position; Gtk.TreePath path; if (!this.get_dest_row_at_pos(x, y, out path, out position)) return false; if (position == Gtk.TreeViewDropPosition.BEFORE) this.set_drag_dest_row(path, Gtk.TreeViewDropPosition.INTO_OR_BEFORE); else if (position == Gtk.TreeViewDropPosition.AFTER) this.set_drag_dest_row(path, Gtk.TreeViewDropPosition.INTO_OR_AFTER); Gdk.drag_status(context, context.get_suggested_action(), time); // avoid too frequent selection... this.last_hover = time; GLib.Timeout.add(150, () => { if (this.last_hover == time) this.get_selection().select_path(path); return false; }); return true; } ///////////////////////////////////////////////////////////////////// /// Called when the user finishes a drag operation on this widget. /// Only used for external drags. ///////////////////////////////////////////////////////////////////// private void on_dnd_received(Gdk.DragContext context, int x, int y, Gtk.SelectionData selection_data, uint info, uint time_) { Gtk.TreeIter active; if (this.get_selection().get_selected(null, out active)) { string id = ""; this.data.get(active, DataPos.ID, out id); var pie = PieManager.all_pies[id]; foreach (var uri in selection_data.get_uris()) { pie.add_action(ActionRegistry.new_for_uri(uri), 0); } this.on_select(id); } } } } Gnome-Pie-0.5.4/src/gui/piePreview.vala000066400000000000000000000374461204074113200176470ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A custom widget displaying the preview of a Pie. It can be used to /// configure the displayed Pie in various aspects. ///////////////////////////////////////////////////////////////////////// class PiePreview : Gtk.DrawingArea { ///////////////////////////////////////////////////////////////////// /// These get called when the last Slice is removed and when the /// first Slice is added respectively. ///////////////////////////////////////////////////////////////////// public signal void on_last_slice_removed(); public signal void on_first_slice_added(); ///////////////////////////////////////////////////////////////////// /// The internally used renderer to draw the Pie. ///////////////////////////////////////////////////////////////////// private PiePreviewRenderer renderer = null; ///////////////////////////////////////////////////////////////////// /// The window which pops up, when a Slice is added or edited. ///////////////////////////////////////////////////////////////////// private NewSliceWindow? new_slice_window = null; ///////////////////////////////////////////////////////////////////// /// A timer used for calculating the frame time. ///////////////////////////////////////////////////////////////////// private GLib.Timer timer; ///////////////////////////////////////////////////////////////////// /// True, when it is possible to drag a slice from this widget. /// False, when the user currently hovers over the add sign. ///////////////////////////////////////////////////////////////////// private bool drag_enabled = false; ///////////////////////////////////////////////////////////////////// /// The ID of the currently displayed Pie. ///////////////////////////////////////////////////////////////////// private string current_id = ""; ///////////////////////////////////////////////////////////////////// /// The position from where a Slice-drag started. ///////////////////////////////////////////////////////////////////// private int drag_start_index = -1; private string drag_start_id = ""; ///////////////////////////////////////////////////////////////////// /// C'tor, creates the widget. ///////////////////////////////////////////////////////////////////// public PiePreview() { this.renderer = new PiePreviewRenderer(); #if HAVE_GTK_3 this.draw.connect(this.on_draw); #else this.expose_event.connect(this.on_draw); #endif this.timer = new GLib.Timer(); this.set_events(Gdk.EventMask.POINTER_MOTION_MASK | Gdk.EventMask.LEAVE_NOTIFY_MASK | Gdk.EventMask.ENTER_NOTIFY_MASK); // setup drag and drop this.enable_drag_source(); Gtk.TargetEntry uri_dest = {"text/uri-list", 0, 0}; Gtk.TargetEntry slice_dest = {"text/plain", Gtk.TargetFlags.SAME_WIDGET, 0}; Gtk.TargetEntry[] destinations = { uri_dest, slice_dest }; Gtk.drag_dest_set(this, Gtk.DestDefaults.ALL, destinations, Gdk.DragAction.COPY | Gdk.DragAction.MOVE | Gdk.DragAction.LINK); this.drag_begin.connect(this.on_start_drag); this.drag_end.connect(this.on_end_drag); this.drag_data_received.connect(this.on_dnd_received); // connect mouse events this.drag_motion.connect(this.on_drag_move); this.leave_notify_event.connect(this.on_mouse_leave); this.enter_notify_event.connect(this.on_mouse_enter); this.motion_notify_event.connect_after(this.on_mouse_move); this.button_release_event.connect_after(this.on_button_release); this.button_press_event.connect_after(this.on_button_press); this.new_slice_window = new NewSliceWindow(); this.new_slice_window.on_select.connect((new_action, as_new_slice, at_position) => { var pie = PieManager.all_pies[this.current_id]; if (new_action.has_quickaction()) renderer.disable_quickactions(); if (as_new_slice) { pie.add_group(new_action, at_position+1); this.renderer.add_group(new_action, at_position+1); if (this.renderer.slice_count() == 1) this.on_first_slice_added(); } else { pie.update_group(new_action, at_position); this.renderer.update_group(new_action, at_position); } }); this.renderer.on_edit_slice.connect((pos) => { this.new_slice_window.reload(); this.new_slice_window.set_parent(this.get_toplevel() as Gtk.Window); this.new_slice_window.show(); var pie = PieManager.all_pies[this.current_id]; this.new_slice_window.set_action(pie.action_groups[pos], pos); }); this.renderer.on_add_slice.connect((pos) => { this.new_slice_window.reload(); this.new_slice_window.set_parent(this.get_toplevel() as Gtk.Window); this.new_slice_window.show(); this.new_slice_window.set_default(this.current_id, pos); }); this.renderer.on_remove_slice.connect((pos) => { var dialog = new Gtk.MessageDialog(this.get_toplevel() as Gtk.Window, Gtk.DialogFlags.MODAL, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, _("Do you really want to delete this Slice?")); dialog.response.connect((response) => { if (response == Gtk.ResponseType.YES) { var pie = PieManager.all_pies[this.current_id]; pie.remove_group(pos); this.renderer.remove_group(pos); if (this.renderer.slice_count() == 0) this.on_last_slice_removed(); } }); dialog.run(); dialog.destroy(); }); } ///////////////////////////////////////////////////////////////////// /// Sets the currently displayed Pie to the Pie with the given ID. ///////////////////////////////////////////////////////////////////// public void set_pie(string id) { this.current_id = id; this.modify_bg(Gtk.StateType.NORMAL, Gtk.rc_get_style(this).light[Gtk.StateType.NORMAL]); this.renderer.load_pie(PieManager.all_pies[id]); if (id == this.drag_start_id) { this.renderer.hide_group(this.drag_start_index); } } ///////////////////////////////////////////////////////////////////// /// Begins the draw loop. It automatically ends, when the containing /// window becomes invisible. ///////////////////////////////////////////////////////////////////// public void draw_loop() { this.timer.start(); this.queue_draw(); GLib.Timeout.add((uint)(1000.0/Config.global.refresh_rate), () => { this.queue_draw(); return this.get_toplevel().visible; }); } ///////////////////////////////////////////////////////////////////// /// Called every frame. ///////////////////////////////////////////////////////////////////// #if HAVE_GTK_3 private bool on_draw(Cairo.Context ctx) { #else private bool on_draw(Gtk.Widget da, Gdk.EventExpose event) { var ctx = Gdk.cairo_create(this.get_window()); #endif // store the frame time double frame_time = this.timer.elapsed(); this.timer.reset(); Gtk.Allocation allocation; this.get_allocation(out allocation); ctx.translate((int)(allocation.width*0.5), (int)(allocation.height*0.5)); this.renderer.draw(frame_time, ctx); return true; } ///////////////////////////////////////////////////////////////////// /// Called when the mouse leaves the area of this widget. ///////////////////////////////////////////////////////////////////// public bool on_mouse_leave(Gdk.EventCrossing event) { this.renderer.on_mouse_leave(); return true; } ///////////////////////////////////////////////////////////////////// /// Called when the mouse enters the area of this widget. ///////////////////////////////////////////////////////////////////// public bool on_mouse_enter(Gdk.EventCrossing event) { this.renderer.on_mouse_enter(); return true; } ///////////////////////////////////////////////////////////////////// /// Called when the mouse moves in the area of this widget. ///////////////////////////////////////////////////////////////////// private bool on_mouse_move(Gdk.EventMotion event) { this.renderer.set_dnd_mode(false); Gtk.Allocation allocation; this.get_allocation(out allocation); this.renderer.on_mouse_move(event.x-allocation.width*0.5, event.y-allocation.height*0.5); if (this.renderer.get_active_slice() < 0) this.disable_drag_source(); else this.enable_drag_source(); return true; } ///////////////////////////////////////////////////////////////////// /// Called when a mouse button is pressed. ///////////////////////////////////////////////////////////////////// private bool on_button_press() { this.renderer.on_button_press(); return true; } ///////////////////////////////////////////////////////////////////// /// Called when a mouse button is released. ///////////////////////////////////////////////////////////////////// private bool on_button_release() { if (!this.renderer.drag_n_drop_mode) this.renderer.on_button_release(); return true; } ///////////////////////////////////////////////////////////////////// /// Called when the mouse is moved over this widget. ///////////////////////////////////////////////////////////////////// private bool on_drag_move(Gdk.DragContext ctx, int x, int y, uint time) { this.renderer.set_dnd_mode(true); Gtk.Allocation allocation; this.get_allocation(out allocation); this.renderer.on_mouse_move(x-allocation.width*0.5, y-allocation.height*0.5); return true; } ///////////////////////////////////////////////////////////////////// /// Called when the user tries to drag something from this widget. ///////////////////////////////////////////////////////////////////// private void on_start_drag(Gdk.DragContext ctx) { this.drag_start_index = this.renderer.get_active_slice(); this.drag_start_id = this.current_id; var icon = this.renderer.get_active_icon(); var pixbuf = icon.to_pixbuf(); this.renderer.hide_group(this.drag_start_index); Gtk.drag_set_icon_pixbuf(ctx, pixbuf, icon.size()/2, icon.size()/2); this.renderer.set_dnd_mode(true); } ///////////////////////////////////////////////////////////////////// /// Called when the user finishes a drag operation on this widget. /// Only used for Slice-movement. ///////////////////////////////////////////////////////////////////// private void on_end_drag(Gdk.DragContext context) { if (context.list_targets() != null) { int target_index = this.renderer.get_active_slice(); this.renderer.set_dnd_mode(false); context.list_targets().foreach((target) => { Gdk.Atom target_type = (Gdk.Atom)target; if (target_type.name() == "text/plain") { if (this.current_id == this.drag_start_id) { var pie = PieManager.all_pies[this.current_id]; pie.move_group(this.drag_start_index, target_index); this.renderer.show_hidden_group_at(target_index); } else { var src_pie = PieManager.all_pies[this.drag_start_id]; var dst_pie = PieManager.all_pies[this.current_id]; dst_pie.add_group(src_pie.action_groups[this.drag_start_index], target_index); this.renderer.add_group(dst_pie.action_groups[target_index], target_index); if (this.renderer.slices.size == 1) this.on_first_slice_added(); if ((context.get_actions() & Gdk.DragAction.COPY) == 0) src_pie.remove_group(this.drag_start_index); } } }); this.drag_start_index = -1; this.drag_start_id = ""; } } ///////////////////////////////////////////////////////////////////// /// Called when the user finishes a drag operation on this widget. /// Only used for external drags. ///////////////////////////////////////////////////////////////////// private void on_dnd_received(Gdk.DragContext context, int x, int y, Gtk.SelectionData selection_data, uint info, uint time_) { var pie = PieManager.all_pies[this.current_id]; int position = this.renderer.get_active_slice(); this.renderer.set_dnd_mode(false); foreach (var uri in selection_data.get_uris()) { pie.add_action(ActionRegistry.new_for_uri(uri), position); this.renderer.add_group(pie.action_groups[position], position); if (this.renderer.slices.size == 1) this.on_first_slice_added(); } } ///////////////////////////////////////////////////////////////////// /// Enables this widget to be a source for drag operations. ///////////////////////////////////////////////////////////////////// private void enable_drag_source() { if (!this.drag_enabled) { this.drag_enabled = true; Gtk.TargetEntry slice_source = {"text/plain", Gtk.TargetFlags.SAME_WIDGET | Gtk.TargetFlags.SAME_APP, 0}; Gtk.TargetEntry[] sources = { slice_source }; Gtk.drag_source_set(this, Gdk.ModifierType.BUTTON1_MASK, sources, Gdk.DragAction.MOVE | Gdk.DragAction.COPY); } } ///////////////////////////////////////////////////////////////////// /// Disables this widget to be a source for drag operations. ///////////////////////////////////////////////////////////////////// private void disable_drag_source() { if (this.drag_enabled) { this.drag_enabled = false; Gtk.drag_source_unset(this); } } } } Gnome-Pie-0.5.4/src/gui/piePreviewAddSign.vala000066400000000000000000000200621204074113200210630ustar00rootroot00000000000000/* 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 . */ using GLib.Math; namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A liitle plus-sign displayed on the preview widget to indicate where /// the user may add a new Slice. ///////////////////////////////////////////////////////////////////////// public class PiePreviewAddSign : GLib.Object { ///////////////////////////////////////////////////////////////////// /// Gets emitted, when the users clicks on this object. ///////////////////////////////////////////////////////////////////// public signal void on_clicked(int position); ///////////////////////////////////////////////////////////////////// /// The image used to display this oject. ///////////////////////////////////////////////////////////////////// public Image icon { get; private set; } ///////////////////////////////////////////////////////////////////// /// True, when the add sign is currently visible. ///////////////////////////////////////////////////////////////////// public bool visible { get; private set; default=false; } ///////////////////////////////////////////////////////////////////// /// The position of the sign in its parent Pie. May be 2.5 for /// example. ///////////////////////////////////////////////////////////////////// private double position = 0; ///////////////////////////////////////////////////////////////////// /// The parent renderer. ///////////////////////////////////////////////////////////////////// private unowned PiePreviewRenderer parent; ///////////////////////////////////////////////////////////////////// /// Some values used for displaying this sign. ///////////////////////////////////////////////////////////////////// private double time = 0; private double max_size = 0; private double angle = 0; private AnimatedValue size; private AnimatedValue alpha; private AnimatedValue activity; private AnimatedValue clicked; ///////////////////////////////////////////////////////////////////// /// C'tor, sets everything up. ///////////////////////////////////////////////////////////////////// public PiePreviewAddSign(PiePreviewRenderer parent) { this.parent = parent; this.size = new AnimatedValue.cubic(AnimatedValue.Direction.OUT, 0, 0, 0, 2.0); this.alpha = new AnimatedValue.cubic(AnimatedValue.Direction.OUT, 0, 0, 0, 0.0); this.activity = new AnimatedValue.cubic(AnimatedValue.Direction.OUT, -3, -3, 0, 0.0); this.clicked = new AnimatedValue.cubic(AnimatedValue.Direction.OUT, 1, 1, 0, 0.0); } ///////////////////////////////////////////////////////////////////// /// Loads the desired icon for this sign. ///////////////////////////////////////////////////////////////////// public void load() { this.icon = new Icon("add", 36); } ///////////////////////////////////////////////////////////////////// /// Updates the position where this object should be displayed. ///////////////////////////////////////////////////////////////////// public void set_position(int position) { double new_position = position; if (!this.parent.drag_n_drop_mode) new_position += 0.5; this.position = new_position; this.angle = 2.0 * PI * new_position/parent.slice_count(); } ///////////////////////////////////////////////////////////////////// /// Makes this object visible. ///////////////////////////////////////////////////////////////////// public void show() { this.visible = true; this.size.reset_target(this.max_size, 0.3); this.alpha.reset_target(1.0, 0.3); } ///////////////////////////////////////////////////////////////////// /// Makes this object invisible. ///////////////////////////////////////////////////////////////////// public void hide() { this.visible = false; this.size.reset_target(0.0, 0.3); this.alpha.reset_target(0.0, 0.3); } ///////////////////////////////////////////////////////////////////// /// Updates the size of this object. All transitions will be smooth. ///////////////////////////////////////////////////////////////////// public void set_size(double size) { this.max_size = size; this.size.reset_target(size, 0.5); } ///////////////////////////////////////////////////////////////////// /// Draws the sign to the given context. ///////////////////////////////////////////////////////////////////// public void draw(double frame_time, Cairo.Context ctx) { this.time += frame_time; this.size.update(frame_time); this.alpha.update(frame_time); this.activity.update(frame_time); this.clicked.update(frame_time); if (this.parent.slice_count() == 0) { ctx.save(); double scale = this.clicked.val + GLib.Math.sin(this.time*10)*0.02*this.alpha.val + this.alpha.val*0.08 - 0.1; ctx.scale(scale, scale); // paint the image icon.paint_on(ctx); ctx.restore(); } else if (this.alpha.val*this.activity.val > 0) { ctx.save(); // distance from the center double radius = 120; // transform the context ctx.translate(cos(this.angle)*radius, sin(this.angle)*radius); double scale = this.size.val*this.clicked.val + this.activity.val*0.07 + GLib.Math.sin(this.time*10)*0.03*this.activity.val - 0.1; ctx.scale(scale, scale); // paint the image icon.paint_on(ctx, this.alpha.val*this.activity.val); ctx.restore(); } } ///////////////////////////////////////////////////////////////////// /// Called when the mouse moves to another position. ///////////////////////////////////////////////////////////////////// public void on_mouse_move(double angle) { double direction = 2.0 * PI * position/parent.slice_count(); double diff = fabs(angle-direction); if (diff > PI) diff = 2 * PI - diff; if (diff < 0.5*PI/parent.slice_count()) this.activity.reset_target(1.0, 1.0); else this.activity.reset_target(-3.0, 1.5); } ///////////////////////////////////////////////////////////////////// /// Called when a button of the mouse is pressed. ///////////////////////////////////////////////////////////////////// public void on_button_press(double x, double y) { if (this.activity.end == 1.0) { this.clicked.reset_target(0.9, 0.1); } } ///////////////////////////////////////////////////////////////////// /// Called when a button of the mouse is released. ///////////////////////////////////////////////////////////////////// public void on_button_release(double x, double y) { if (this.clicked.end == 0.9) { this.clicked.reset_target(1.0, 0.1); this.on_clicked((int)this.position); } } } } Gnome-Pie-0.5.4/src/gui/piePreviewCenter.vala000066400000000000000000000075471204074113200210070ustar00rootroot00000000000000/* 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 . */ using GLib.Math; namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// ///////////////////////////////////////////////////////////////////////// public class PiePreviewCenter : GLib.Object { ///////////////////////////////////////////////////////////////////// /// THe Images displayed. When the displayed text changes the /// currently displayed text becomes the old_text. So it's possible /// to create a smooth transitions. ///////////////////////////////////////////////////////////////////// private RenderedText text = null; private RenderedText old_text = null; ///////////////////////////////////////////////////////////////////// /// Stores the currently displayed text in order to avoid frequent /// and useless updates. ///////////////////////////////////////////////////////////////////// private string current_text = null; ///////////////////////////////////////////////////////////////////// /// An AnimatedValue for smooth transitions. ///////////////////////////////////////////////////////////////////// private AnimatedValue blend; ///////////////////////////////////////////////////////////////////// /// The parent renderer. ///////////////////////////////////////////////////////////////////// private unowned PiePreviewRenderer parent; ///////////////////////////////////////////////////////////////////// /// C'tor, sets everything up. ///////////////////////////////////////////////////////////////////// public PiePreviewCenter(PiePreviewRenderer parent) { this.parent = parent; this.blend = new AnimatedValue.linear(0, 0, 0); this.text = new RenderedText("", 1, 1, "", new Color(), 1.0); this.old_text = text; } ///////////////////////////////////////////////////////////////////// /// Updates the currently displayed text. It will be smoothly /// blended and may contain pango markup. ///////////////////////////////////////////////////////////////////// public void set_text(string text) { if (text != this.current_text) { var style = new Gtk.Style(); this.old_text = this.text; this.text = new RenderedText.with_markup(text, 180, 180, style.font_desc.get_family()+" 10", new Color.from_gdk(style.fg[0]), 1.0); this.current_text = text; this.blend.reset_target(0.0, 0.0); this.blend.reset_target(1.0, 0.1); } } ///////////////////////////////////////////////////////////////////// /// Draws the center to the given context. ///////////////////////////////////////////////////////////////////// public void draw(double frame_time, Cairo.Context ctx) { this.blend.update(frame_time); ctx.save(); if (this.parent.slice_count() == 0) ctx.translate(0, 40); this.old_text.paint_on(ctx, 1-this.blend.val); this.text.paint_on(ctx, this.blend.val); ctx.restore(); } } } Gnome-Pie-0.5.4/src/gui/piePreviewDeleteSign.vala000066400000000000000000000162141204074113200216010ustar00rootroot00000000000000/* 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 . */ using GLib.Math; namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// The delete sign, displayed in the upper right corner of each /// Slice. ///////////////////////////////////////////////////////////////////////// public class PiePreviewDeleteSign : GLib.Object { ///////////////////////////////////////////////////////////////////// /// Called when the user clicked on this sign. ///////////////////////////////////////////////////////////////////// public signal void on_clicked(); ///////////////////////////////////////////////////////////////////// /// The image used to display this oject. ///////////////////////////////////////////////////////////////////// public Image icon { get; private set; } ///////////////////////////////////////////////////////////////////// /// Some constants determining the look and behaviour of this Slice. ///////////////////////////////////////////////////////////////////// private const int radius = 18; private const double globale_scale = 0.8; private const double click_cancel_treshold = 5; ///////////////////////////////////////////////////////////////////// /// True, when the add sign is currently visible. ///////////////////////////////////////////////////////////////////// private bool visible = false; ///////////////////////////////////////////////////////////////////// /// Some AnimatedValues for smooth transitions. ///////////////////////////////////////////////////////////////////// private AnimatedValue size; private AnimatedValue alpha; private AnimatedValue activity; private AnimatedValue clicked; ///////////////////////////////////////////////////////////////////// /// Storing the position where a mouse click was executed. Useful for /// canceling the click when the mouse moves some pixels. ///////////////////////////////////////////////////////////////////// private double clicked_x = 0.0; private double clicked_y = 0.0; ///////////////////////////////////////////////////////////////////// /// C'tor, sets everything up. ///////////////////////////////////////////////////////////////////// public PiePreviewDeleteSign() { this.size = new AnimatedValue.cubic(AnimatedValue.Direction.OUT, 0, 0, 0, 2.0); this.alpha = new AnimatedValue.cubic(AnimatedValue.Direction.OUT, 0, 0, 0, 0.0); this.activity = new AnimatedValue.cubic(AnimatedValue.Direction.OUT, -3, -3, 0, 0.0); this.clicked = new AnimatedValue.cubic(AnimatedValue.Direction.OUT, 1, 1, 0, 0.0); } ///////////////////////////////////////////////////////////////////// /// Loads an Action. All members are initialized accordingly. ///////////////////////////////////////////////////////////////////// public void load() { this.icon = new Icon("stock_delete", radius*2); } ///////////////////////////////////////////////////////////////////// /// Makes this object visible. ///////////////////////////////////////////////////////////////////// public void show() { if (!this.visible) { this.visible = true; this.alpha.reset_target(1.0, 0.3); } } ///////////////////////////////////////////////////////////////////// /// Makes this object invisible. ///////////////////////////////////////////////////////////////////// public void hide() { if (this.visible) { this.visible = false; this.alpha.reset_target(0.0, 0.3); } } ///////////////////////////////////////////////////////////////////// /// Updates the size of this object. All transitions will be smooth. ///////////////////////////////////////////////////////////////////// public void set_size(double size) { this.size.reset_target(size, 0.2); } ///////////////////////////////////////////////////////////////////// /// Draws the sign to the given context. ///////////////////////////////////////////////////////////////////// public void draw(double frame_time, Cairo.Context ctx) { this.size.update(frame_time); this.alpha.update(frame_time); this.activity.update(frame_time); this.clicked.update(frame_time); if (this.alpha.val > 0) { ctx.save(); // transform the context double scale = (this.size.val*this.clicked.val + this.activity.val*0.2 - 0.2)*globale_scale; ctx.scale(scale, scale); // paint the image icon.paint_on(ctx, this.alpha.val); ctx.restore(); } } ///////////////////////////////////////////////////////////////////// /// Called when the mouse moves to another position. ///////////////////////////////////////////////////////////////////// public bool on_mouse_move(double x, double y) { if (this.clicked.end == 0.9) { double dist = GLib.Math.pow(x-this.clicked_x, 2) + GLib.Math.pow(y-this.clicked_y, 2); if (dist > this.click_cancel_treshold*this.click_cancel_treshold) this.clicked.reset_target(1.0, 0.1); } if (GLib.Math.fabs(x) <= radius*globale_scale && GLib.Math.fabs(y) <= radius*globale_scale) { this.activity.reset_target(1.0, 0.2); return true; } this.activity.reset_target(0.0, 0.2); return false; } ///////////////////////////////////////////////////////////////////// /// Called when a button of the mouse is pressed. ///////////////////////////////////////////////////////////////////// public bool on_button_press(double x, double y) { if (this.activity.end == 1.0) { this.clicked.reset_target(0.9, 0.1); this.clicked_x = x; this.clicked_y = y; return true; } return false; } ///////////////////////////////////////////////////////////////////// /// Called when a button of the mouse is released. ///////////////////////////////////////////////////////////////////// public bool on_button_release(double x, double y) { if (this.clicked.end == 0.9) { this.clicked.reset_target(1.0, 0.1); this.on_clicked(); return true; } return false; } } } Gnome-Pie-0.5.4/src/gui/piePreviewRenderer.vala000066400000000000000000000422111204074113200213200ustar00rootroot00000000000000/* 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 . */ using GLib.Math; namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A complex class which is able to draw the preview of a Pie. It can /// manipulate the displayed Pie as well. ///////////////////////////////////////////////////////////////////////// public class PiePreviewRenderer : GLib.Object { ///////////////////////////////////////////////////////////////////// /// These signals get emitted when a slice is added, removed or /// manipulated. ///////////////////////////////////////////////////////////////////// public signal void on_add_slice(int position); public signal void on_remove_slice(int position); public signal void on_edit_slice(int position); ///////////////////////////////////////////////////////////////////// /// True, when there is currently a drag going on. ///////////////////////////////////////////////////////////////////// public bool drag_n_drop_mode { get; private set; default=false; } ///////////////////////////////////////////////////////////////////// /// A list containing all SliceRenderers of this Pie. ///////////////////////////////////////////////////////////////////// public Gee.ArrayList slices; ///////////////////////////////////////////////////////////////////// /// When a Slice is moved within a Pie it is temporarily removed. /// If so, it is stored in this member. ///////////////////////////////////////////////////////////////////// public PiePreviewSliceRenderer hidden_group { get; private set; default=null; } ///////////////////////////////////////////////////////////////////// /// The add sign which indicates that a new Slice could be added. ///////////////////////////////////////////////////////////////////// private PiePreviewAddSign add_sign = null; ///////////////////////////////////////////////////////////////////// /// The object which renders the name of the currently selected Slice /// in the middle. ///////////////////////////////////////////////////////////////////// private PiePreviewCenter center_renderer = null; private enum CenterDisplay { NONE, ACTIVE_SLICE, DROP, ADD, DELETE } ///////////////////////////////////////////////////////////////////// /// Some members storing some inter-frame-information. ///////////////////////////////////////////////////////////////////// private int active_slice = -1; private double angle = 0.0; private double mouse_x = 0.0; private double mouse_y = 0.0; ///////////////////////////////////////////////////////////////////// /// C'tor, initializes members. ///////////////////////////////////////////////////////////////////// public PiePreviewRenderer() { this.slices = new Gee.ArrayList(); this.center_renderer = new PiePreviewCenter(this); this.add_sign = new PiePreviewAddSign(this); this.add_sign.load(); this.add_sign.on_clicked.connect((pos) => { this.on_add_slice(pos); }); } ///////////////////////////////////////////////////////////////////// /// Loads an Pie. All members are initialized accordingly. ///////////////////////////////////////////////////////////////////// public void load_pie(Pie pie) { this.slices.clear(); foreach (var group in pie.action_groups) { var renderer = new PiePreviewSliceRenderer(this); renderer.load(group); this.add_slice_renderer(renderer); this.connect_siganls(renderer); } this.active_slice = -1; this.update_sizes(); this.update_positions(false); } ///////////////////////////////////////////////////////////////////// /// Enables or disables the drag n dropn mode. ///////////////////////////////////////////////////////////////////// public void set_dnd_mode(bool dnd) { if (this.drag_n_drop_mode != dnd) { this.drag_n_drop_mode = dnd; this.update_positions(); this.update_sizes(); } } ///////////////////////////////////////////////////////////////////// /// Returns the number of Slices. ///////////////////////////////////////////////////////////////////// public int slice_count() { if (this.drag_n_drop_mode && !(this.slices.size == 0)) return slices.size+1; return slices.size; } ///////////////////////////////////////////////////////////////////// /// Returns the index of the currently hovered Slice. ///////////////////////////////////////////////////////////////////// public int get_active_slice() { if (this.slices.size == 0) return 0; if (this.drag_n_drop_mode) return (int)(this.angle/(2*PI)*this.slice_count() + 0.5) % this.slice_count(); return this.active_slice; } ///////////////////////////////////////////////////////////////////// /// Returns the Icon of the currently hovered Slice. ///////////////////////////////////////////////////////////////////// public Icon get_active_icon() { if (this.active_slice >= 0 && this.active_slice < this.slices.size) return this.slices[this.active_slice].icon; else return new Icon("", 24); } ///////////////////////////////////////////////////////////////////// /// Draws the entire Pie to the given context. ///////////////////////////////////////////////////////////////////// public void draw(double frame_time, Cairo.Context ctx) { this.add_sign.draw(frame_time, ctx); this.center_renderer.draw(frame_time, ctx); foreach (var slice in this.slices) slice.draw(frame_time, ctx); } ///////////////////////////////////////////////////////////////////// /// Called when the mouse leaves the drawing area of this renderer. ///////////////////////////////////////////////////////////////////// public void on_mouse_leave() { this.add_sign.hide(); this.update_positions(); this.update_center(CenterDisplay.NONE); foreach (var slice in this.slices) slice.on_mouse_leave(); } ///////////////////////////////////////////////////////////////////// /// Called when the mouse enters the drawing area of this renderer. ///////////////////////////////////////////////////////////////////// public void on_mouse_enter() { this.add_sign.show(); this.update_positions(); } ///////////////////////////////////////////////////////////////////// /// Called when the mouse moves in the drawing area of this renderer. ///////////////////////////////////////////////////////////////////// public void on_mouse_move(double x, double y) { this.mouse_x = x; this.mouse_y = y; this.angle = acos(x/sqrt(x*x + y*y)); if (y < 0) this.angle = 2*PI - this.angle; if (!this.drag_n_drop_mode) this.active_slice = -1; bool delete_hovered = false; for (int i=0; i index) { this.slices.remove_at(index); this.update_positions(); this.update_sizes(); } } ///////////////////////////////////////////////////////////////////// /// Hides the Slice at the given position temporarily. ///////////////////////////////////////////////////////////////////// public void hide_group(int index) { if (this.slices.size > index) { this.hidden_group = this.slices[index]; this.remove_group(index); } } ///////////////////////////////////////////////////////////////////// /// Re-shows a Slice which has been hidden before. ///////////////////////////////////////////////////////////////////// public void show_hidden_group_at(int index) { if (this.slices.size >= index && this.hidden_group != null) { this.hidden_group.set_position(index, false); this.add_slice_renderer(this.hidden_group, index); this.hidden_group = null; } } ///////////////////////////////////////////////////////////////////// /// Updates a Slice at the given position. ///////////////////////////////////////////////////////////////////// public void update_group(ActionGroup group, int index) { if (this.slices.size > index) { var renderer = new PiePreviewSliceRenderer(this); this.slices.set(index, renderer); renderer.load(group); this.connect_siganls(renderer); this.update_positions(false); this.update_sizes(); } } ///////////////////////////////////////////////////////////////////// /// Disables all quickactions of this pie preview. ///////////////////////////////////////////////////////////////////// public void disable_quickactions() { foreach (var slice in this.slices) slice.disable_quickactions(); } ///////////////////////////////////////////////////////////////////// /// Helper method which adds a new Slice to the given position. ///////////////////////////////////////////////////////////////////// private void add_slice_renderer(PiePreviewSliceRenderer renderer, int at_position = -1) { if (at_position < 0 || at_position >= this.slices.size) this.slices.add(renderer); else this.slices.insert(at_position, renderer); this.update_positions(false); this.update_sizes(); } ///////////////////////////////////////////////////////////////////// /// Helper method which connects all neccessary signals of a newly /// added Slice. ///////////////////////////////////////////////////////////////////// private void connect_siganls(PiePreviewSliceRenderer renderer) { renderer.on_clicked.connect((pos) => { this.on_edit_slice(pos); }); renderer.on_remove.connect((pos) => { this.on_remove_slice(pos); }); } ///////////////////////////////////////////////////////////////////// /// Moves all slices to their positions. This may happen smoothly if /// desired. ///////////////////////////////////////////////////////////////////// private void update_positions(bool smoothly = true) { if (this.slices.size > 0) { if (this.add_sign.visible) { int add_position = 0; add_position = (int)(this.angle/(2*PI)*this.slice_count()) % this.slice_count(); this.add_sign.set_position(add_position); for (int i=0; i= add_position ? i+1 : i, smoothly); } this.update_center(CenterDisplay.DROP); } else { for (int i=0; i 20) size = 0.5; else if (this.slice_count() > 8) size = 1.0 - (double)(this.slice_count() - 8)/24.0; this.add_sign.set_size(size); for (int i=0; i= 0 && this.active_slice < this.slices.size) this.center_renderer.set_text("" + GLib.Markup.escape_text(slices[this.active_slice].name) + "\n" + _("Click to edit") + "\n" + _("Drag to move") + ""); break; case CenterDisplay.ADD: this.center_renderer.set_text("" + _("Click to add a new Slice") + ""); break; case CenterDisplay.DROP: if (hidden_group == null) this.center_renderer.set_text("" + _("Drop to add as new Slice") + ""); else this.center_renderer.set_text("" + GLib.Markup.escape_text(this.hidden_group.name) + "\n" + _("Drop to move Slice") + ""); break; case CenterDisplay.DELETE: if (this.active_slice >= 0 && this.active_slice < this.slices.size) this.center_renderer.set_text("" + GLib.Markup.escape_text(slices[this.active_slice].name) + "\n" + _("Click to delete") + "\n" + _("Drag to move") + ""); break; default: this.center_renderer.set_text(""); break; } } } } Gnome-Pie-0.5.4/src/gui/piePreviewSliceRenderer.vala000066400000000000000000000255211204074113200223050ustar00rootroot00000000000000/* 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 . */ using GLib.Math; namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// Displays the preview of a Slice. ///////////////////////////////////////////////////////////////////////// public class PiePreviewSliceRenderer : GLib.Object { ///////////////////////////////////////////////////////////////////// /// Called when the user clicked on this Slice. ///////////////////////////////////////////////////////////////////// public signal void on_clicked(int position); ///////////////////////////////////////////////////////////////////// /// Called when the user clicked on the delete sign. ///////////////////////////////////////////////////////////////////// public signal void on_remove(int position); ///////////////////////////////////////////////////////////////////// /// The image used to display this oject. ///////////////////////////////////////////////////////////////////// public Icon icon { get; private set; } public ActionGroup action_group { get; private set; } public string name { get; private set; default=""; } public bool delete_hovered { get; private set; default=false; } ///////////////////////////////////////////////////////////////////// /// The parent renderer. ///////////////////////////////////////////////////////////////////// private unowned PiePreviewRenderer parent; ///////////////////////////////////////////////////////////////////// /// The delete sign, displayed in the upper right corner of each /// Slice. ///////////////////////////////////////////////////////////////////// private PiePreviewDeleteSign delete_sign = null; ///////////////////////////////////////////////////////////////////// /// Some AnimatedValues for smooth transitions. ///////////////////////////////////////////////////////////////////// private AnimatedValue angle; private AnimatedValue size; private AnimatedValue activity; private AnimatedValue clicked; ///////////////////////////////////////////////////////////////////// /// Some constants determining the look and behaviour of this Slice. ///////////////////////////////////////////////////////////////////// private const double pie_radius = 126; private const double radius = 24; private const double delete_x = 13; private const double delete_y = -13; private const double click_cancel_treshold = 5; ///////////////////////////////////////////////////////////////////// /// Storing the position where a mouse click was executed. Useful for /// canceling the click when the mouse moves some pixels. ///////////////////////////////////////////////////////////////////// private double clicked_x = 0.0; private double clicked_y = 0.0; ///////////////////////////////////////////////////////////////////// /// The index of this slice in a pie. Clockwise assigned, starting /// from the right-most slice. ///////////////////////////////////////////////////////////////////// private int position; ///////////////////////////////////////////////////////////////////// /// C'tor, sets everything up. ///////////////////////////////////////////////////////////////////// public PiePreviewSliceRenderer(PiePreviewRenderer parent) { this.delete_sign = new PiePreviewDeleteSign(); this.delete_sign.load(); this.delete_sign.on_clicked.connect(() => { this.on_remove(this.position); }); this.parent = parent; this.angle = new AnimatedValue.cubic(AnimatedValue.Direction.OUT, 0, 0, 0, 0.5); this.size = new AnimatedValue.cubic(AnimatedValue.Direction.OUT, 0, 0, 0, 1.0); this.activity = new AnimatedValue.cubic(AnimatedValue.Direction.OUT, 0, 0, 0, 0.0); this.clicked = new AnimatedValue.cubic(AnimatedValue.Direction.OUT, 1, 1, 0, 1.0); } ///////////////////////////////////////////////////////////////////// /// Loads an Action. All members are initialized accordingly. ///////////////////////////////////////////////////////////////////// public void load(ActionGroup group) { this.action_group = group; // if it's a custom ActionGroup if (group.get_type().depth() == 2 && group.actions.size > 0) { this.icon = new Icon(group.actions[0].icon, (int)(radius*2)); this.name = group.actions[0].name; } else { this.icon = new Icon(GroupRegistry.descriptions[group.get_type().name()].icon, (int)(radius*2)); this.name = GroupRegistry.descriptions[group.get_type().name()].name; } } ///////////////////////////////////////////////////////////////////// /// Updates the position where this object should be displayed. ///////////////////////////////////////////////////////////////////// public void set_position(int position, bool smoothly = true) { double direction = 2.0 * PI * position/parent.slice_count(); if (direction != this.angle.end) { this.position = position; this.angle.reset_target(direction, smoothly ? 0.5 : 0.0); if (!smoothly) this.angle.update(1.0); } } ///////////////////////////////////////////////////////////////////// /// Updates the size of this object. All transitions will be smooth. ///////////////////////////////////////////////////////////////////// public void set_size(double size) { this.size.reset_target(size, 0.5); this.delete_sign.set_size(size); } ///////////////////////////////////////////////////////////////////// /// Notifies that all quick actions should be disabled. ///////////////////////////////////////////////////////////////////// public void disable_quickactions() { this.action_group.disable_quickactions(); } ///////////////////////////////////////////////////////////////////// /// Draws the slice to the given context. ///////////////////////////////////////////////////////////////////// public void draw(double frame_time, Cairo.Context ctx) { this.size.update(frame_time); this.angle.update(frame_time); this.activity.update(frame_time); this.clicked.update(frame_time); ctx.save(); // transform the context ctx.translate(cos(this.angle.val)*pie_radius, sin(this.angle.val)*pie_radius); double scale = this.size.val*this.clicked.val + this.activity.val*0.1 - 0.1; ctx.save(); ctx.scale(scale, scale); // paint the image icon.paint_on(ctx); ctx.restore(); ctx.translate(delete_x*this.size.val, delete_y*this.size.val); this.delete_sign.draw(frame_time, ctx); ctx.restore(); } ///////////////////////////////////////////////////////////////////// /// Called when the mouse moves to another position. ///////////////////////////////////////////////////////////////////// public bool on_mouse_move(double angle, double x, double y) { double direction = 2.0 * PI * position/parent.slice_count(); double diff = fabs(angle-direction); if (diff > PI) diff = 2 * PI - diff; bool active = diff < 0.5*PI/parent.slice_count(); if (active) { this.activity.reset_target(1.0, 0.3); this.delete_sign.show(); } else { this.activity.reset_target(0.0, 0.3); this.delete_sign.hide(); } if (this.clicked.end == 0.9) { double dist = GLib.Math.pow(x-this.clicked_x, 2) + GLib.Math.pow(y-this.clicked_y, 2); if (dist > this.click_cancel_treshold*this.click_cancel_treshold) this.clicked.reset_target(1.0, 0.1); } double own_x = cos(this.angle.val)*pie_radius; double own_y = sin(this.angle.val)*pie_radius; this.delete_hovered = this.delete_sign.on_mouse_move(x - own_x - delete_x*this.size.val, y - own_y - delete_y*this.size.val); return active; } ///////////////////////////////////////////////////////////////////// /// Called when the mouse leaves the area of this widget. ///////////////////////////////////////////////////////////////////// public void on_mouse_leave() { this.activity.reset_target(0.0, 0.3); this.delete_sign.hide(); } ///////////////////////////////////////////////////////////////////// /// Called when a button of the mouse is pressed. ///////////////////////////////////////////////////////////////////// public void on_button_press(double x, double y) { bool delete_pressed = false; if (this.activity.end == 1.0) { double own_x = cos(this.angle.val)*pie_radius; double own_y = sin(this.angle.val)*pie_radius; delete_pressed = this.delete_sign.on_button_press(x - own_x - delete_x*this.size.val, y - own_y - delete_y*this.size.val); } if (!delete_pressed && this.activity.end == 1.0) { this.clicked.reset_target(0.9, 0.1); this.clicked_x = x; this.clicked_y = y; } } ///////////////////////////////////////////////////////////////////// /// Called when a button of the mouse is released. ///////////////////////////////////////////////////////////////////// public void on_button_release(double x, double y) { bool deleted = false; if (this.activity.end == 1.0) deleted = this.delete_sign.on_button_release(x, y); if (!deleted && this.clicked.end == 0.9) { this.clicked.reset_target(1.0, 0.1); this.on_clicked(this.position); } } } } Gnome-Pie-0.5.4/src/gui/preferencesWindow.vala000066400000000000000000000315571204074113200212160ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// The settings menu of Gnome-Pie. ///////////////////////////////////////////////////////////////////////// public class PreferencesWindow : GLib.Object { ///////////////////////////////////////////////////////////////////// /// The ID of the currently selected Pie. ///////////////////////////////////////////////////////////////////// private string selected_id = ""; ///////////////////////////////////////////////////////////////////// /// Some Gtk widgets used by this window. ///////////////////////////////////////////////////////////////////// private Gtk.Window? window = null; private Gtk.Label? id_label = null; private Gtk.Label? name_label = null; private Gtk.Label? hotkey_label = null; private Gtk.Label? no_pie_label = null; private Gtk.Label? no_slice_label = null; private Gtk.VBox? preview_box = null; private Gtk.Image? icon = null; private Gtk.EventBox? preview_background = null; private Gtk.Button? icon_button = null; private Gtk.Button? name_button = null; private Gtk.Button? hotkey_button = null; private Gtk.ToolButton? remove_pie_button = null; ///////////////////////////////////////////////////////////////////// /// Some custom widgets and dialogs used by this window. ///////////////////////////////////////////////////////////////////// private PiePreview? preview = null; private PieList? pie_list = null; private SettingsWindow? settings_window = null; private TriggerSelectWindow? trigger_window = null; private IconSelectWindow? icon_window = null; private RenameWindow? rename_window = null; ///////////////////////////////////////////////////////////////////// /// C'tor, creates the window. ///////////////////////////////////////////////////////////////////// public PreferencesWindow() { try { var builder = new Gtk.Builder(); builder.add_from_file (Paths.ui_files + "/preferences.ui"); this.window = builder.get_object("window") as Gtk.Window; this.window.add_events(Gdk.EventMask.BUTTON_RELEASE_MASK | Gdk.EventMask.KEY_RELEASE_MASK | Gdk.EventMask.KEY_PRESS_MASK | Gdk.EventMask.POINTER_MOTION_MASK); #if HAVE_GTK_3 var toolbar = builder.get_object ("toolbar") as Gtk.Widget; toolbar.get_style_context().add_class("primary-toolbar"); var inline_toolbar = builder.get_object ("pies-toolbar") as Gtk.Widget; inline_toolbar.get_style_context().add_class("inline-toolbar"); #endif this.pie_list = new PieList(); this.pie_list.on_select.connect(this.on_pie_select); var scroll_area = builder.get_object("pies-scrolledwindow") as Gtk.ScrolledWindow; scroll_area.add(this.pie_list); this.preview = new PiePreview(); this.preview.on_first_slice_added.connect(() => { this.no_slice_label.hide(); }); this.preview.on_last_slice_removed.connect(() => { this.no_slice_label.show(); }); preview_box = builder.get_object("preview-box") as Gtk.VBox; this.preview_box.pack_start(preview, true, true); this.id_label = builder.get_object("id-label") as Gtk.Label; this.name_label = builder.get_object("pie-name-label") as Gtk.Label; this.hotkey_label = builder.get_object("hotkey-label") as Gtk.Label; this.no_pie_label = builder.get_object("no-pie-label") as Gtk.Label; this.no_slice_label = builder.get_object("no-slice-label") as Gtk.Label; this.icon = builder.get_object("icon") as Gtk.Image; this.preview_background = builder.get_object("preview-background") as Gtk.EventBox; (builder.get_object("settings-button") as Gtk.ToolButton).clicked.connect(on_settings_button_clicked); this.hotkey_button = builder.get_object("key-button") as Gtk.Button; this.hotkey_button.clicked.connect(on_key_button_clicked); this.icon_button = builder.get_object("icon-button") as Gtk.Button; this.icon_button.clicked.connect(on_icon_button_clicked); this.name_button = builder.get_object("rename-button") as Gtk.Button; this.name_button.clicked.connect(on_rename_button_clicked); this.remove_pie_button = builder.get_object("remove-pie-button") as Gtk.ToolButton; this.remove_pie_button.clicked.connect(on_remove_pie_button_clicked); (builder.get_object("add-pie-button") as Gtk.ToolButton).clicked.connect(on_add_pie_button_clicked); this.window.hide.connect(() => { // save settings on close Config.global.save(); Pies.save(); Timeout.add(100, () => { IconSelectWindow.clear_icons(); return false; }); }); this.window.delete_event.connect(this.window.hide_on_delete); } catch (GLib.Error e) { error("Could not load UI: %s\n", e.message); } } ///////////////////////////////////////////////////////////////////// /// Shows the window. ///////////////////////////////////////////////////////////////////// public void show() { this.preview.draw_loop(); this.window.show_all(); this.pie_list.select_first(); this.preview_background.modify_bg(Gtk.StateType.NORMAL, Gtk.rc_get_style(this.window).light[0]); } ///////////////////////////////////////////////////////////////////// /// Called when a new Pie is selected in the PieList. ///////////////////////////////////////////////////////////////////// private void on_pie_select(string id) { selected_id = id; this.no_slice_label.hide(); this.no_pie_label.hide(); this.preview_box.hide(); this.name_button.sensitive = false; this.hotkey_button.sensitive = false; this.icon_button.sensitive = false; this.remove_pie_button.sensitive = false; if (id == "") { this.id_label.label = ""; this.name_label.label = _("No Pie selected."); this.hotkey_label.set_markup(""); this.icon.icon_name = "stock_unknown"; this.no_pie_label.show(); } else { var pie = PieManager.all_pies[selected_id]; this.id_label.label = ("ID: %s").printf(pie.id); this.name_label.label = PieManager.get_name_of(pie.id); this.hotkey_label.set_markup(PieManager.get_accelerator_label_of(pie.id)); if (pie.icon.contains("/")) try { this.icon.pixbuf = new Gdk.Pixbuf.from_file_at_scale(pie.icon, this.icon.get_pixel_size(), this.icon.get_pixel_size(), true); } catch (GLib.Error error) { warning(error.message); } else this.icon.icon_name = pie.icon; this.preview.set_pie(id); this.preview_box.show(); if (pie.action_groups.size == 0) { this.no_slice_label.show(); } this.name_button.sensitive = true; this.hotkey_button.sensitive = true; this.icon_button.sensitive = true; this.remove_pie_button.sensitive = true; } } ///////////////////////////////////////////////////////////////////// /// Called when the add Pie button is clicked. ///////////////////////////////////////////////////////////////////// private void on_add_pie_button_clicked(Gtk.ToolButton button) { var new_pie = PieManager.create_persistent_pie(_("New Pie"), "stock_unknown", null); this.pie_list.reload_all(); this.pie_list.select(new_pie.id); } ///////////////////////////////////////////////////////////////////// /// Called when the remove Pie button is clicked. ///////////////////////////////////////////////////////////////////// private void on_remove_pie_button_clicked(Gtk.ToolButton button) { if (this.selected_id != "") { var dialog = new Gtk.MessageDialog((Gtk.Window)this.window.get_toplevel(), Gtk.DialogFlags.MODAL, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, _("Do you really want to delete the selected Pie with all contained Slices?")); dialog.response.connect((response) => { if (response == Gtk.ResponseType.YES) { PieManager.remove_pie(selected_id); this.pie_list.reload_all(); this.pie_list.select_first(); } }); dialog.run(); dialog.destroy(); } } ///////////////////////////////////////////////////////////////////// /// Called when rename Pie button is clicked. ///////////////////////////////////////////////////////////////////// private void on_rename_button_clicked(Gtk.Button button) { if (this.rename_window == null) { this.rename_window = new RenameWindow(); this.rename_window.set_parent(window); this.rename_window.on_ok.connect((name) => { var pie = PieManager.all_pies[selected_id]; pie.name = name; PieManager.create_launcher(pie.id); this.name_label.label = name; this.pie_list.reload_all(); }); } this.rename_window.set_pie(selected_id); this.rename_window.show(); } ///////////////////////////////////////////////////////////////////// /// Called when the hotkey button is clicked. ///////////////////////////////////////////////////////////////////// private void on_key_button_clicked(Gtk.Button button) { if (this.trigger_window == null) { this.trigger_window = new TriggerSelectWindow(); this.trigger_window.set_parent(window); this.trigger_window.on_ok.connect((trigger) => { PieManager.bind_trigger(trigger, selected_id); this.hotkey_label.set_markup(trigger.label_with_specials); }); } this.trigger_window.set_pie(selected_id); this.trigger_window.show(); } ///////////////////////////////////////////////////////////////////// /// Called when the general settings button is clicked. ///////////////////////////////////////////////////////////////////// private void on_settings_button_clicked(Gtk.ToolButton button) { if (this.settings_window == null) { this.settings_window = new SettingsWindow(); this.settings_window.set_parent(this.window.get_toplevel() as Gtk.Window); } this.settings_window.show(); } ///////////////////////////////////////////////////////////////////// /// Called when the icon button is clicked. ///////////////////////////////////////////////////////////////////// private void on_icon_button_clicked(Gtk.Button button) { if (this.icon_window == null) { this.icon_window = new IconSelectWindow(this.window); this.icon_window.on_ok.connect((icon) => { var pie = PieManager.all_pies[selected_id]; pie.icon = icon; PieManager.create_launcher(pie.id); this.pie_list.reload_all(); }); } this.icon_window.show(); this.icon_window.set_icon(PieManager.all_pies[selected_id].icon); } } } Gnome-Pie-0.5.4/src/gui/renameWindow.vala000066400000000000000000000077261204074113200201650ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A window which allows selection of a new name for a Pie. ///////////////////////////////////////////////////////////////////////// public class RenameWindow : GLib.Object { ///////////////////////////////////////////////////////////////////// /// Gets emitted when the user selects a new name. ///////////////////////////////////////////////////////////////////// public signal void on_ok(string new_name); ///////////////////////////////////////////////////////////////////// /// Some Widgets used by this dialog. ///////////////////////////////////////////////////////////////////// private Gtk.Dialog window = null; private Gtk.Entry entry = null; ///////////////////////////////////////////////////////////////////// /// C'tor, constructs the Widget. ///////////////////////////////////////////////////////////////////// public RenameWindow() { try { Gtk.Builder builder = new Gtk.Builder(); builder.add_from_file (Paths.ui_files + "/rename_pie.ui"); window = builder.get_object("window") as Gtk.Dialog; entry = builder.get_object("name-entry") as Gtk.Entry; entry.activate.connect(this.on_ok_button_clicked); (builder.get_object("ok-button") as Gtk.Button).clicked.connect(on_ok_button_clicked); (builder.get_object("cancel-button") as Gtk.Button).clicked.connect(on_cancel_button_clicked); this.window.delete_event.connect(this.window.hide_on_delete); } catch (GLib.Error e) { error("Could not load UI: %s\n", e.message); } } ///////////////////////////////////////////////////////////////////// /// Sets the parent window, in order to make this window stay in /// front. ///////////////////////////////////////////////////////////////////// public void set_parent(Gtk.Window parent) { this.window.set_transient_for(parent); } ///////////////////////////////////////////////////////////////////// /// Displays the window on the screen. ///////////////////////////////////////////////////////////////////// public void show() { this.window.show_all(); this.entry.is_focus = true; } ///////////////////////////////////////////////////////////////////// /// Make the text entry display the name of the Pie with given ID. ///////////////////////////////////////////////////////////////////// public void set_pie(string id) { entry.text = PieManager.get_name_of(id); } ///////////////////////////////////////////////////////////////////// /// Called when the ok button is pressed. ///////////////////////////////////////////////////////////////////// private void on_ok_button_clicked() { this.on_ok(entry.text); this.window.hide(); } ///////////////////////////////////////////////////////////////////// /// Called when the cancel button is pressed. ///////////////////////////////////////////////////////////////////// private void on_cancel_button_clicked() { this.window.hide(); } } } Gnome-Pie-0.5.4/src/gui/settingsWindow.vala000066400000000000000000000200651204074113200205450ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// The settings menu of Gnome-Pie, with options for theme switching and /// some general options. ///////////////////////////////////////////////////////////////////////// public class SettingsWindow : GLib.Object { ///////////////////////////////////////////////////////////////////// /// Some widgets. ///////////////////////////////////////////////////////////////////// private Gtk.Dialog? window = null; private ThemeList? theme_list = null; private Gtk.ToggleButton? indicator = null; private Gtk.ToggleButton? autostart = null; private Gtk.ToggleButton? captions = null; ///////////////////////////////////////////////////////////////////// /// C'tor creates, the dialog. ///////////////////////////////////////////////////////////////////// public SettingsWindow() { try { Gtk.Builder builder = new Gtk.Builder(); builder.add_from_file (Paths.ui_files + "/settings.ui"); this.window = builder.get_object("window") as Gtk.Dialog; this.theme_list = new ThemeList(); this.theme_list.on_select_new.connect(() => { this.captions.active = Config.global.show_captions; if (Config.global.theme.has_slice_captions) { this.captions.sensitive = true; } else { this.captions.sensitive = false; } }); var scroll_area = builder.get_object("theme-scrolledwindow") as Gtk.ScrolledWindow; scroll_area.add(this.theme_list); (builder.get_object("close-button") as Gtk.Button).clicked.connect(on_close_button_clicked); this.autostart = (builder.get_object("autostart-checkbox") as Gtk.ToggleButton); this.autostart.toggled.connect(on_autostart_toggled); this.indicator = (builder.get_object("indicator-checkbox") as Gtk.ToggleButton); this.indicator.toggled.connect(on_indicator_toggled); this.captions = (builder.get_object("captions-checkbox") as Gtk.ToggleButton); this.captions.toggled.connect(on_captions_toggled); var scale_slider = (builder.get_object("scale-hscale") as Gtk.HScale); scale_slider.set_range(0.5, 2.0); scale_slider.set_increments(0.05, 0.25); scale_slider.set_value(Config.global.global_scale); bool changing = false; bool changed_again = false; scale_slider.value_changed.connect(() => { if (!changing) { changing = true; Timeout.add(300, () => { if (changed_again) { changed_again = false; return true; } Config.global.global_scale = scale_slider.get_value(); Config.global.load_themes(Config.global.theme.name); changing = false; return false; }); } else { changed_again = true; } }); this.window.delete_event.connect(this.window.hide_on_delete); } catch (GLib.Error e) { error("Could not load UI: %s\n", e.message); } } ///////////////////////////////////////////////////////////////////// /// Sets the parent window, in order to make this window stay in /// front. ///////////////////////////////////////////////////////////////////// public void set_parent(Gtk.Window parent) { this.window.set_transient_for(parent); } ///////////////////////////////////////////////////////////////////// /// Displays the window on the screen. ///////////////////////////////////////////////////////////////////// public void show() { this.indicator.active = Config.global.show_indicator; this.autostart.active = Config.global.auto_start; this.captions.active = Config.global.show_captions; if (Config.global.theme.has_slice_captions) { this.captions.sensitive = true; } else { this.captions.sensitive = false; } this.window.show_all(); } ///////////////////////////////////////////////////////////////////// /// Called when the close button is clicked. ///////////////////////////////////////////////////////////////////// private void on_close_button_clicked() { this.window.hide(); } ///////////////////////////////////////////////////////////////////// /// Creates or deletes the autostart file. This code is inspired /// by project synapse as well. ///////////////////////////////////////////////////////////////////// private void on_autostart_toggled(Gtk.ToggleButton check_box) { bool active = check_box.active; if (!active && FileUtils.test(Paths.autostart, FileTest.EXISTS)) { Config.global.auto_start = false; // delete the autostart file FileUtils.remove (Paths.autostart); } else if (active && !FileUtils.test(Paths.autostart, FileTest.EXISTS)) { Config.global.auto_start = true; string autostart_entry = "#!/usr/bin/env xdg-open\n" + "[Desktop Entry]\n" + "Name=Gnome-Pie\n" + "Exec=" + Paths.executable + "\n" + "Encoding=UTF-8\n" + "Type=Application\n" + "X-GNOME-Autostart-enabled=true\n" + "Icon=gnome-pie\n"; // create the autostart file string autostart_dir = GLib.Path.get_dirname(Paths.autostart); if (!FileUtils.test(autostart_dir, FileTest.EXISTS | FileTest.IS_DIR)) { DirUtils.create_with_parents(autostart_dir, 0755); } try { FileUtils.set_contents(Paths.autostart, autostart_entry); FileUtils.chmod(Paths.autostart, 0755); } catch (Error e) { var d = new Gtk.MessageDialog (this.window, 0, Gtk.MessageType.ERROR, Gtk.ButtonsType.CLOSE, "%s", e.message); d.run (); d.destroy (); } } } ///////////////////////////////////////////////////////////////////// /// Shows or hides the indicator. ///////////////////////////////////////////////////////////////////// private void on_indicator_toggled(Gtk.ToggleButton check_box) { var check = check_box as Gtk.CheckButton; Config.global.show_indicator = check.active; } ///////////////////////////////////////////////////////////////////// /// Shows or hides the captions of Slices. ///////////////////////////////////////////////////////////////////// private void on_captions_toggled(Gtk.ToggleButton check_box) { var check = check_box as Gtk.CheckButton; Config.global.show_captions = check.active; } } } Gnome-Pie-0.5.4/src/gui/sliceTypeList.vala000066400000000000000000000152631204074113200203160ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A list displaying all available Action types and ActionGroup types. ///////////////////////////////////////////////////////////////////////// class SliceTypeList : Gtk.TreeView { ///////////////////////////////////////////////////////////////////// /// This signal gets emitted when the user selects a new Type. ///////////////////////////////////////////////////////////////////// public signal void on_select(string id, string icon_name); ///////////////////////////////////////////////////////////////////// /// The listore which staroes all types internally. ///////////////////////////////////////////////////////////////////// private Gtk.ListStore data; private enum DataPos {ICON, ICON_NAME, NAME, ID} ///////////////////////////////////////////////////////////////////// /// C'tor, constructs the Widget. ///////////////////////////////////////////////////////////////////// public SliceTypeList() { GLib.Object(); this.data = new Gtk.ListStore(4, typeof(Gdk.Pixbuf), typeof(string), typeof(string), typeof(string)); this.data.set_sort_column_id(2, Gtk.SortType.ASCENDING); base.set_model(this.data); base.set_headers_visible(true); base.set_grid_lines(Gtk.TreeViewGridLines.NONE); this.set_fixed_height_mode(true); var main_column = new Gtk.TreeViewColumn(); main_column.set_sizing(Gtk.TreeViewColumnSizing.FIXED); main_column.title = _("Slice types"); var icon_render = new Gtk.CellRendererPixbuf(); main_column.pack_start(icon_render, false); var name_render = new Gtk.CellRendererText(); main_column.pack_start(name_render, true); base.append_column(main_column); main_column.add_attribute(icon_render, "pixbuf", DataPos.ICON); main_column.add_attribute(name_render, "markup", DataPos.NAME); this.get_selection().changed.connect(() => { Gtk.TreeIter active; if (this.get_selection().get_selected(null, out active)) { string id = ""; string icon = ""; this.data.get(active, DataPos.ID, out id); this.data.get(active, DataPos.ICON_NAME, out icon); this.on_select(id, icon); } }); reload_all(); } ///////////////////////////////////////////////////////////////////// /// Loads a registered actions and action groups. ///////////////////////////////////////////////////////////////////// public void reload_all() { Gtk.TreeIter active; string current_id = ""; if (this.get_selection().get_selected(null, out active)) this.data.get(active, DataPos.ID, out current_id); data.clear(); foreach (var action_type in ActionRegistry.types) { var description = ActionRegistry.descriptions[action_type]; Gtk.TreeIter current; data.append(out current); var icon = new Icon(description.icon, 36); data.set(current, DataPos.ICON, icon.to_pixbuf()); data.set(current, DataPos.ICON_NAME, description.icon); data.set(current, DataPos.NAME, "" + GLib.Markup.escape_text(description.name) + "\n" + "" + GLib.Markup.escape_text(description.description) + ""); data.set(current, DataPos.ID, description.id); } foreach (var group_type in GroupRegistry.types) { var description = GroupRegistry.descriptions[group_type]; Gtk.TreeIter current; data.append(out current); var icon = new Icon(description.icon, 36); data.set(current, DataPos.ICON, icon.to_pixbuf()); data.set(current, DataPos.ICON_NAME, description.icon); data.set(current, DataPos.NAME, "" + GLib.Markup.escape_text(description.name) + "\n" + "" + GLib.Markup.escape_text(description.description) + ""); data.set(current, DataPos.ID, description.id); } select_first(); select(current_id); } ///////////////////////////////////////////////////////////////////// /// Selects the first type in the list. ///////////////////////////////////////////////////////////////////// public void select_first() { Gtk.TreeIter active; if(this.data.get_iter_first(out active) ) { this.get_selection().select_iter(active); string id = ""; string icon = ""; this.data.get(active, DataPos.ID, out id); this.data.get(active, DataPos.ICON_NAME, out icon); this.on_select(id, icon); } else { this.on_select("", "stock_unknown"); } } ///////////////////////////////////////////////////////////////////// /// Select the given slice type. ///////////////////////////////////////////////////////////////////// public void select(string id) { this.data.foreach((model, path, iter) => { string pie_id; this.data.get(iter, DataPos.ID, out pie_id); if (id == pie_id) { this.get_selection().select_iter(iter); string icon = ""; this.data.get(iter, DataPos.ICON_NAME, out icon); this.on_select(pie_id, icon); this.scroll_to_cell(path, null, true, 0.5f, 0.5f); this.has_focus = true; return true; } return false; }); } } } Gnome-Pie-0.5.4/src/gui/themeList.vala000066400000000000000000000104361204074113200174540ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A widget displaying all available themes of Gnome-Pie. ///////////////////////////////////////////////////////////////////////// class ThemeList : Gtk.TreeView { ///////////////////////////////////////////////////////////////////// /// This signal gets emitted, when a new theme is selected by the /// user. This new theme is applied automatically, with this signal /// actions may be triggered which should be executed AFTER the /// change to a new theme. ///////////////////////////////////////////////////////////////////// public signal void on_select_new(); ///////////////////////////////////////////////////////////////////// /// The currently selected row. ///////////////////////////////////////////////////////////////////// private Gtk.TreeIter active { private get; private set; } ///////////////////////////////////////////////////////////////////// /// The positions in the data list store. ///////////////////////////////////////////////////////////////////// private enum DataPos {ICON, NAME} ///////////////////////////////////////////////////////////////////// /// C'tor, constructs the Widget. ///////////////////////////////////////////////////////////////////// public ThemeList() { GLib.Object(); var data = new Gtk.ListStore(2, typeof(Gdk.Pixbuf), typeof(string)); this.set_model(data); this.set_headers_visible(true); this.set_grid_lines(Gtk.TreeViewGridLines.NONE); this.set_fixed_height_mode(true); var main_column = new Gtk.TreeViewColumn(); main_column.title = _("Themes"); main_column.set_sizing(Gtk.TreeViewColumnSizing.FIXED); var icon_render = new Gtk.CellRendererPixbuf(); main_column.pack_start(icon_render, false); var theme_render = new Gtk.CellRendererText(); main_column.pack_start(theme_render, true); this.append_column(main_column); main_column.add_attribute(icon_render, "pixbuf", DataPos.ICON); main_column.add_attribute(theme_render, "markup", DataPos.NAME); this.get_selection().changed.connect(() => { Gtk.TreeIter active; if (this.get_selection().get_selected(null, out active)) { Timeout.add(10, () => { int index = int.parse(data.get_path(active).to_string()); Config.global.theme = Config.global.themes[index]; this.on_select_new(); Config.global.theme.load(); Config.global.theme.load_images(); return false; }); } }); // load all themes into the list var themes = Config.global.themes; foreach(var theme in themes) { Gtk.TreeIter current; data.append(out current); data.set(current, DataPos.ICON, theme.preview_icon.to_pixbuf()); data.set(current, DataPos.NAME, ""+GLib.Markup.escape_text(theme.name)+" - " +GLib.Markup.escape_text(theme.description)+"\n" +""+GLib.Markup.escape_text(_("By")+" "+theme.author) +""); if(theme == Config.global.theme) get_selection().select_iter(current); } } } } Gnome-Pie-0.5.4/src/gui/triggerSelectButton.vala000066400000000000000000000143771204074113200215250ustar00rootroot00000000000000/* 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 . */ 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 TriggerSelectButton : Gtk.ToggleButton { ///////////////////////////////////////////////////////////////////// /// This signal is emitted when the user selects a new hot key. ///////////////////////////////////////////////////////////////////// public signal void on_select(Trigger trigger); ///////////////////////////////////////////////////////////////////// /// The currently contained Trigger. ///////////////////////////////////////////////////////////////////// private Trigger trigger = null; ///////////////////////////////////////////////////////////////////// /// True, if mouse buttons can be bound as well. ///////////////////////////////////////////////////////////////////// private bool enable_mouse = false; ///////////////////////////////////////////////////////////////////// /// These modifiers are ignored. ///////////////////////////////////////////////////////////////////// private Gdk.ModifierType lock_modifiers = Gdk.ModifierType.MOD2_MASK |Gdk.ModifierType.SUPER_MASK |Gdk.ModifierType.LOCK_MASK |Gdk.ModifierType.MOD5_MASK; ///////////////////////////////////////////////////////////////////// /// C'tor, constructs a new TriggerSelectWindow. ///////////////////////////////////////////////////////////////////// public TriggerSelectButton(bool enable_mouse) { this.enable_mouse = enable_mouse; this.toggled.connect(() => { if (this.active) { this.set_label(_("Press a hotkey ...")); Gtk.grab_add(this); FocusGrabber.grab(this.get_window(), true, true, true); } }); this.button_press_event.connect(this.on_button_press); this.key_press_event.connect(this.on_key_press); this.set_trigger(new Trigger()); } ///////////////////////////////////////////////////////////////////// /// Makes the button display the given Trigger. ///////////////////////////////////////////////////////////////////// public void set_trigger(Trigger trigger) { this.trigger = trigger; this.set_label(trigger.label); } ///////////////////////////////////////////////////////////////////// /// Can be called to cancel the selection process. ///////////////////////////////////////////////////////////////////// private void cancel() { this.set_label(trigger.label); this.set_active(false); Gtk.grab_remove(this); FocusGrabber.ungrab(true, true); } ///////////////////////////////////////////////////////////////////// /// Makes the button display the given Trigger. ///////////////////////////////////////////////////////////////////// private void update_trigger(Trigger trigger) { if (this.trigger.name != trigger.name) { this.set_trigger(trigger); this.on_select(this.trigger); } this.cancel(); } ///////////////////////////////////////////////////////////////////// /// Called when the user presses a keyboard key. ///////////////////////////////////////////////////////////////////// private bool on_key_press(Gdk.EventKey event) { if (this.active) { if (Gdk.keyval_name(event.keyval) == "Escape") { this.cancel(); } 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(event.keyval, state, false, false, false, false)); } return true; } return false; } ///////////////////////////////////////////////////////////////////// /// Called when the user presses a button of the mouse. ///////////////////////////////////////////////////////////////////// private bool on_button_press(Gdk.EventButton event) { if (this.active) { Gtk.Allocation rect; this.get_allocation(out rect); if (event.x < 0 || event.x > rect.width || event.y < 0 || event.y > rect.height) { this.cancel(); return true; } } if (this.active && this.enable_mouse) { Gdk.ModifierType state = event.state & ~ this.lock_modifiers; var new_trigger = new Trigger.from_values((int)event.button, state, true, false, false, false); if (new_trigger.key_code != 1) this.update_trigger(new_trigger); else this.cancel(); return true; } else if (this.active) { this.cancel(); return true; } return false; } } } Gnome-Pie-0.5.4/src/gui/triggerSelectWindow.vala000066400000000000000000000177141204074113200215170ustar00rootroot00000000000000/* 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 . */ 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 : GLib.Object { ///////////////////////////////////////////////////////////////////// /// This signal is emitted when the user selects a new hot key. ///////////////////////////////////////////////////////////////////// public signal void on_ok(Trigger trigger); ///////////////////////////////////////////////////////////////////// /// Some private members which are needed by other methods. ///////////////////////////////////////////////////////////////////// private Gtk.Dialog window; private Gtk.CheckButton turbo; private Gtk.CheckButton delayed; private Gtk.CheckButton centered; private TriggerSelectButton button; ///////////////////////////////////////////////////////////////////// /// 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; ///////////////////////////////////////////////////////////////////// /// C'tor, constructs a new TriggerSelectWindow. ///////////////////////////////////////////////////////////////////// public TriggerSelectWindow() { try { Gtk.Builder builder = new Gtk.Builder(); builder.add_from_file (Paths.ui_files + "/trigger_select.ui"); this.window = builder.get_object("window") as Gtk.Dialog; this.button = new TriggerSelectButton(true); this.button.show(); this.button.on_select.connect((trigger) => { this.trigger = new Trigger.from_values(trigger.key_sym, trigger.modifiers, trigger.with_mouse, this.turbo.active, this.delayed.active, this.centered.active); }); (builder.get_object("trigger-box") as Gtk.VBox).pack_start(this.button, true, true); (builder.get_object("ok-button") as Gtk.Button).clicked.connect(this.on_ok_button_clicked); (builder.get_object("cancel-button") as Gtk.Button).clicked.connect(this.on_cancel_button_clicked); this.turbo = builder.get_object("turbo-check") as Gtk.CheckButton; this.turbo.toggled.connect(this.on_check_toggled); this.delayed = builder.get_object("delay-check") as Gtk.CheckButton; this.delayed.toggled.connect(this.on_check_toggled); this.centered = builder.get_object("center-check") as Gtk.CheckButton; this.centered.toggled.connect(this.on_check_toggled); this.window.delete_event.connect(this.window.hide_on_delete); } catch (GLib.Error e) { error("Could not load UI: %s\n", e.message); } } ///////////////////////////////////////////////////////////////////// /// Sets the parent window, in order to make this window stay in /// front. ///////////////////////////////////////////////////////////////////// public void set_parent(Gtk.Window parent) { this.window.set_transient_for(parent); } ///////////////////////////////////////////////////////////////////// /// Displays the window on the screen. ///////////////////////////////////////////////////////////////////// public void show() { this.window.show_all(); } ///////////////////////////////////////////////////////////////////// /// Initilizes all members to match the Trigger of the Pie with the /// given ID. ///////////////////////////////////////////////////////////////////// public void set_pie(string id) { var trigger = new Trigger.from_string(PieManager.get_accelerator_of(id)); this.turbo.active = trigger.turbo; this.delayed.active = trigger.delayed; this.centered.active = trigger.centered; this.original_trigger = trigger; this.trigger = trigger; this.button.set_trigger(trigger); } ///////////////////////////////////////////////////////////////////// /// Called when one of the three checkoxes is toggled. ///////////////////////////////////////////////////////////////////// private void on_check_toggled() { if (this.trigger != null) this.trigger = new Trigger.from_values(this.trigger.key_sym, this.trigger.modifiers, this.trigger.with_mouse, this.turbo.active, this.delayed.active, this.centered.active); } ///////////////////////////////////////////////////////////////////// /// Called when the OK-button is pressed. ///////////////////////////////////////////////////////////////////// private void on_ok_button_clicked() { var assigned_id = PieManager.get_assigned_id(this.trigger); if (this.trigger == this.original_trigger) { // nothing did change this.window.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_ok(this.trigger); this.window.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.window.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_ok(this.trigger); this.window.hide(); } } ///////////////////////////////////////////////////////////////////// /// Called when the cancel button is pressed. ///////////////////////////////////////////////////////////////////// private void on_cancel_button_clicked() { this.window.hide(); } } } Gnome-Pie-0.5.4/src/images/000077500000000000000000000000001204074113200153265ustar00rootroot00000000000000Gnome-Pie-0.5.4/src/images/icon.vala000066400000000000000000000112401204074113200171210ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A class representing a square-shaped icon, loaded from the users /// icon theme. ///////////////////////////////////////////////////////////////////////// public class Icon : Image { ///////////////////////////////////////////////////////////////////// /// A cache which stores loaded icon. It is cleared when the icon /// theme of the user changes. The key is in form @. ///////////////////////////////////////////////////////////////////// private static Gee.HashMap cache { private get; private set; } ///////////////////////////////////////////////////////////////////// /// Initializes the cache. ///////////////////////////////////////////////////////////////////// public static void init() { clear_cache(); Gtk.IconTheme.get_default().changed.connect(() => { clear_cache(); }); } ///////////////////////////////////////////////////////////////////// /// Clears the cache. ///////////////////////////////////////////////////////////////////// public static void clear_cache() { cache = new Gee.HashMap(); } ///////////////////////////////////////////////////////////////////// /// Loads an icon from the current icon theme of the user. ///////////////////////////////////////////////////////////////////// public Icon(string icon_name, int size) { var cached = this.cache.get("%s@%u".printf(icon_name, size)); if (cached == null) { this.load_file_at_size(this.get_icon_file(icon_name, size), size, size); this.cache.set("%s@%u".printf(icon_name, size), this.surface); } else { this.surface = cached; } } ///////////////////////////////////////////////////////////////////// /// Returns the size of the icon in pixels. Greetings to Liskov. ///////////////////////////////////////////////////////////////////// public int size() { return base.width(); } ///////////////////////////////////////////////////////////////////// /// Returns the icon name for a given GLib.Icon. ///////////////////////////////////////////////////////////////////// public static string get_icon_name(GLib.Icon? icon) { if (icon != null) { var icon_names = icon.to_string().split(" "); foreach (var icon_name in icon_names) { if (Gtk.IconTheme.get_default().has_icon(icon_name)) { return icon_name; } } } return ""; } ///////////////////////////////////////////////////////////////////// /// Returns the filename for a given system icon. ///////////////////////////////////////////////////////////////////// public static string get_icon_file(string icon_name, int size) { string result = ""; if (icon_name.contains("/")) { var file = GLib.File.new_for_path(icon_name); if(file.query_exists()) return icon_name; warning("Icon \"" + icon_name + "\" not found! Using default icon..."); icon_name = "stock_unknown"; } var icon_theme = Gtk.IconTheme.get_default(); var file = icon_theme.lookup_icon(icon_name, size, 0); if (file != null) result = file.get_filename(); if (result == "") { warning("Icon \"" + icon_name + "\" not found! Using default icon..."); icon_name = "stock_unknown"; file = icon_theme.lookup_icon(icon_name, size, 0); if (file != null) result = file.get_filename(); } if (result == "") warning("Icon \"" + icon_name + "\" not found! Will be ugly..."); return result; } } } Gnome-Pie-0.5.4/src/images/image.vala000066400000000000000000000205531204074113200172620ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A class which loads image files. It can load image files in various /// formats, including jpeg, png and svg. ///////////////////////////////////////////////////////////////////////// public class Image : GLib.Object { ///////////////////////////////////////////////////////////////////// /// The internally used surface. ///////////////////////////////////////////////////////////////////// public Cairo.ImageSurface surface { public get; protected set; default=null; } ///////////////////////////////////////////////////////////////////// /// Creates an empty Image. ///////////////////////////////////////////////////////////////////// public Image.empty(int width, int height, Color? color = null) { this.surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, width, height); if (color != null) { var ctx = this.context(); ctx.set_source_rgb(color.r, color.g, color.b); ctx.paint(); } } ///////////////////////////////////////////////////////////////////// /// Creates an image from the the given filename. ///////////////////////////////////////////////////////////////////// public Image.from_file(string filename) { this.load_file(filename); } ///////////////////////////////////////////////////////////////////// /// Creates an image from the the given filename at a given size. ///////////////////////////////////////////////////////////////////// public Image.from_file_at_size(string filename, int width, int height) { this.load_file_at_size(filename, width, height); } ///////////////////////////////////////////////////////////////////// /// Creates an image from the the given Gdk.Pixbuf. ///////////////////////////////////////////////////////////////////// public Image.from_pixbuf(Gdk.Pixbuf pixbuf) { if (pixbuf != null) this.load_pixbuf(pixbuf); else this.surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, 1, 1); } ///////////////////////////////////////////////////////////////////// /// Captures a part of the screen. ///////////////////////////////////////////////////////////////////// public Image.capture_screen(int posx, int posy, int width, int height, bool hide_pies = true) { Gdk.Window root = Gdk.get_default_root_window(); #if HAVE_GTK_3 Gdk.Pixbuf pixbuf = Gdk.pixbuf_get_from_window(root, posx, posy, width, height); #else Gdk.Pixbuf pixbuf = Gdk.pixbuf_get_from_drawable(null, root, null, posx, posy, 0, 0, width, height); #endif this.load_pixbuf(pixbuf); if (hide_pies) { // check for opened pies foreach (var window in PieManager.opened_windows) { if (window.background != null) { int x=0, y=0, dx=0, dy=0; window.get_position(out x, out y); window.get_size(out dx, out dy); var ctx = this.context(); ctx.translate((int)(x-posx + (dx+3)/2), (int)(y-posy + (dy+3)/2)); window.background.paint_on(ctx); } } } } ///////////////////////////////////////////////////////////////////// /// Loads an image from the the given filename. ///////////////////////////////////////////////////////////////////// public void load_file(string filename) { try { var pixbuf = new Gdk.Pixbuf.from_file(filename); if (pixbuf != null) { this.load_pixbuf(pixbuf); } else { warning("Failed to load " + filename + "!"); this.surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, 1, 1); } } catch (GLib.Error e) { message("Error loading image file: %s", e.message); this.surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, 1, 1); } } ///////////////////////////////////////////////////////////////////// /// Loads an image from the the given filename at a given size. ///////////////////////////////////////////////////////////////////// public void load_file_at_size(string filename, int width, int height) { try { var pixbuf = new Gdk.Pixbuf.from_file_at_size(filename, width, height); if (pixbuf != null) { this.load_pixbuf(pixbuf); } else { warning("Failed to load " + filename + "!"); this.surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, width, height); } } catch (GLib.Error e) { message("Error loading image file: %s", e.message); this.surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, width, height); } } ///////////////////////////////////////////////////////////////////// /// Loads an image from the the given Gdk.Pixbuf. ///////////////////////////////////////////////////////////////////// public void load_pixbuf(Gdk.Pixbuf pixbuf) { this.surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, pixbuf.width, pixbuf.height); var ctx = this.context(); Gdk.cairo_set_source_pixbuf(ctx, pixbuf, 1.0, 1.0); ctx.paint(); } ///////////////////////////////////////////////////////////////////// /// Paints the image onto the given Cairo.Context ///////////////////////////////////////////////////////////////////// public void paint_on(Cairo.Context ctx, double alpha = 1.0) { ctx.set_source_surface(this.surface, (int)(-0.5*this.width()-1), (int)(-0.5*this.height()-1)); if (alpha >= 1.0) ctx.paint(); else ctx.paint_with_alpha(alpha); } ///////////////////////////////////////////////////////////////////// /// Converts the image to a Gdk.Pixbuf. ///////////////////////////////////////////////////////////////////// public Gdk.Pixbuf to_pixbuf() { var pixbuf = new Gdk.Pixbuf.from_data(surface.get_data(), Gdk.Colorspace.RGB, true, 8, width(), height(), surface.get_stride(), null); pixbuf = pixbuf.copy(); // funny stuff here --- need to swap Red end Blue because Cairo // and Gdk are different... uint8* p = pixbuf.pixels; for (int i=0; i. */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A class representing string, rendered on an Image. ///////////////////////////////////////////////////////////////////////// public class RenderedText : Image { ///////////////////////////////////////////////////////////////////// /// C'tor, creates a new image representation of a string. ///////////////////////////////////////////////////////////////////// public RenderedText(string text, int width, int height, string font, Color color, double scale) { this.render_text(text, width, height, font, color, scale); } ///////////////////////////////////////////////////////////////////// /// C'tor, creates a new image representation of a string. This /// string may contain markup information. ///////////////////////////////////////////////////////////////////// public RenderedText.with_markup(string text, int width, int height, string font, Color color, double scale) { this.render_markup(text, width, height, font, color, scale); } ///////////////////////////////////////////////////////////////////// /// Creates a new transparent image, with text written onto. ///////////////////////////////////////////////////////////////////// public void render_text(string text, int width, int height, string font, Color color, double scale) { this.surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, width, height); if (text != "") { var ctx = this.context(); // set the color ctx.set_source_rgb(color.r, color.g, color.g); var layout = Pango.cairo_create_layout(ctx); layout.set_width(Pango.units_from_double(width)); var font_description = Pango.FontDescription.from_string(font); font_description.set_size((int)(font_description.get_size() * scale)); layout.set_font_description(font_description); layout.set_text(text, -1); // add newlines at the end of each line, in order to allow ellipsizing string broken_string = ""; for (int i=0; i height) broken_string = broken_string + next_line; else broken_string = broken_string_tmp; } } layout.set_text(broken_string, -1); layout.set_ellipsize(Pango.EllipsizeMode.END); layout.set_alignment(Pango.Alignment.CENTER); Pango.Rectangle extents; layout.get_pixel_extents(null, out extents); ctx.move_to(0, (int)(0.5*(height - extents.height))); Pango.cairo_update_layout(ctx, layout); Pango.cairo_show_layout(ctx, layout); } } ///////////////////////////////////////////////////////////////////// /// Creates a new transparent image, with text written onto. ///////////////////////////////////////////////////////////////////// public void render_markup(string text, int width, int height, string font, Color color, double scale) { this.surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, width, height); var ctx = this.context(); // set the color ctx.set_source_rgb(color.r, color.g, color.g); var layout = Pango.cairo_create_layout(ctx); layout.set_width(Pango.units_from_double(width)); var font_description = Pango.FontDescription.from_string(font); font_description.set_size((int)(font_description.get_size() * scale)); layout.set_font_description(font_description); layout.set_markup(text, -1); layout.set_ellipsize(Pango.EllipsizeMode.END); layout.set_alignment(Pango.Alignment.CENTER); Pango.Rectangle extents; layout.get_pixel_extents(null, out extents); ctx.move_to(0, (int)(0.5*(height - extents.height))); Pango.cairo_update_layout(ctx, layout); Pango.cairo_show_layout(ctx, layout); } } } Gnome-Pie-0.5.4/src/images/themedIcon.vala000066400000000000000000000114651204074113200202610ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A class representing a square-shaped icon, themed according to the /// current theme of Gnome-Pie. ///////////////////////////////////////////////////////////////////////// public class ThemedIcon : Image { ///////////////////////////////////////////////////////////////////// /// Paint a slice icon according to the current theme. ///////////////////////////////////////////////////////////////////// public ThemedIcon(string caption, string icon_name, bool active) { // get layers for the desired slice type var layers = active ? Config.global.theme.active_slice_layers : Config.global.theme.inactive_slice_layers; // get max size int size = 1; foreach (var layer in layers) { if (layer.image != null && layer.image.width() > size) size = layer.image.width(); } this.surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, size, size); // get size of icon layer int icon_size = size; foreach (var layer in layers) { if (layer.image != null && layer.layer_type == SliceLayer.Type.ICON) icon_size = layer.image.width(); } Image icon; if (icon_name.contains("/")) icon = new Image.from_file_at_size(icon_name, icon_size, icon_size); else icon = new Icon(icon_name, icon_size); var color = new Color.from_icon(icon); var ctx = this.context(); ctx.translate(size/2, size/2); ctx.set_operator(Cairo.Operator.OVER); // now render all layers on top of each other foreach (var layer in layers) { if (layer.visibility == SliceLayer.Visibility.ANY || (Config.global.show_captions == (layer.visibility == SliceLayer.Visibility.WITH_CAPTION))) { if (layer.colorize) { ctx.push_group(); } if (layer.layer_type == SliceLayer.Type.ICON) { ctx.push_group(); layer.image.paint_on(ctx); ctx.set_operator(Cairo.Operator.IN); if (layer.image.width() != icon_size) { if (icon_name.contains("/")) icon = new Image.from_file_at_size(icon_name, layer.image.width(), layer.image.width()); else icon = new Icon(icon_name,layer.image.width()); } icon.paint_on(ctx); ctx.pop_group_to_source(); ctx.paint(); ctx.set_operator(Cairo.Operator.OVER); } else if (layer.layer_type == SliceLayer.Type.CAPTION) { Image text = new RenderedText(caption, layer.width, layer.height, layer.font, layer.color, Config.global.global_scale); ctx.translate(0, layer.position); text.paint_on(ctx); ctx.translate(0, -layer.position); } else if (layer.layer_type == SliceLayer.Type.FILE) { layer.image.paint_on(ctx); } // colorize the whole layer if neccasary if (layer.colorize) { ctx.set_operator(Cairo.Operator.ATOP); ctx.set_source_rgb(color.r, color.g, color.b); ctx.paint(); ctx.set_operator(Cairo.Operator.OVER); ctx.pop_group_to_source(); ctx.paint(); } } } } ///////////////////////////////////////////////////////////////////// /// Returns the size of the icon in pixels. Greetings to Liskov. ///////////////////////////////////////////////////////////////////// public int size() { return base.width(); } } } Gnome-Pie-0.5.4/src/pies/000077500000000000000000000000001204074113200150215ustar00rootroot00000000000000Gnome-Pie-0.5.4/src/pies/defaultConfig.vala000066400000000000000000000072761204074113200204540ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A helper class which creates a user-specific default configuration. ///////////////////////////////////////////////////////////////////////// namespace Pies { public void create_default_config() { // add a pie with playback controls var multimedia = PieManager.create_persistent_pie(_("Multimedia"), "stock_media-play", new Trigger.from_string("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", new Trigger.from_string("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")); apps.add_action(ActionRegistry.default_for_mime_type("image/jpg")); apps.add_action(ActionRegistry.default_for_uri("http")); 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", new Trigger.from_string("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", new Trigger.from_string("q")); session.add_group(new SessionGroup(session.id)); // add a pie with a main menu var menu = PieManager.create_persistent_pie(_("Main Menu"), "alacarte", new Trigger.from_string("space")); menu.add_group(new MenuGroup(menu.id)); // add a pie with window controls var window = PieManager.create_persistent_pie(_("Window"), "gnome-window-manager", new Trigger.from_string("w")); window.add_action(new KeyAction(_("Scale"), "top", "s")); window.add_action(new KeyAction(_("Minimize"), "bottom", "F9", true)); window.add_action(new KeyAction(_("Close"), "window-close", "F4")); window.add_action(new KeyAction(_("Maximize"), "window_fullscreen", "F10")); window.add_action(new KeyAction(_("Restore"), "window_nofullscreen", "F5")); // save the configuration to file Pies.save(); } } } Gnome-Pie-0.5.4/src/pies/load.vala000066400000000000000000000173561204074113200166210ustar00rootroot00000000000000/* 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 . */ using GLib.Math; namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A helper method which loads pies according to the configuration file. ///////////////////////////////////////////////////////////////////////// namespace Pies { ///////////////////////////////////////////////////////////////////// /// Loads all Pies from the pies.conf file. ///////////////////////////////////////////////////////////////////// public void load() { // check whether the config file exists if (!GLib.File.new_for_path(Paths.pie_config).query_exists()) { message("Creating new configuration file in \"" + Paths.pie_config + "\"."); Pies.create_default_config(); return; } message("Loading Pies from \"" + Paths.pie_config + "\"."); // load the settings file Xml.Parser.init(); Xml.Doc* piesXML = Xml.Parser.parse_file(Paths.pie_config); if (piesXML != null) { // begin parsing at the root element Xml.Node* root = piesXML->get_root_element(); if (root != null) { for (Xml.Node* node = root->children; node != null; node = node->next) { if (node->type == Xml.ElementType.ELEMENT_NODE) { string node_name = node->name.down(); switch (node_name) { case "pie": parse_pie(node); break; default: warning("Invalid child element <" + node_name + "> in element pies.conf!"); break; } } } } else { warning("Error loading pies: pies.conf is empty! The cake is a lie..."); } delete piesXML; } else { warning("Error loading pies: pies.conf not found! The cake is a lie..."); } } ///////////////////////////////////////////////////////////////////// /// Parses a element from the pies.conf file. ///////////////////////////////////////////////////////////////////// private static void parse_pie(Xml.Node* node) { string hotkey = ""; string name = ""; string icon = ""; string id = ""; int quickaction = -1; // parse all attributes of this node for (Xml.Attr* attribute = node->properties; attribute != null; attribute = attribute->next) { string attr_name = attribute->name.down(); string attr_content = attribute->children->content; switch (attr_name) { case "hotkey": hotkey = attr_content; break; case "quickaction": quickaction = int.parse(attr_content); break; case "name": name = attr_content; break; case "icon": icon = attr_content; break; case "id": id = attr_content; break; default: warning("Invalid setting \"" + attr_name + "\" in pies.conf!"); break; } } if (name == "") { warning("Invalid element in pies.conf: No name specified!"); return; } // add a new Pie with the loaded properties 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) { if (slice->type == Xml.ElementType.ELEMENT_NODE) { string node_name = slice->name.down(); switch (node_name) { case "slice": parse_slice(slice, pie); break; case "group": parse_group(slice, pie); break; default: warning("Invalid child element <" + node_name + "> in element in pies.conf!"); break; } } } } ///////////////////////////////////////////////////////////////////// /// Parses a element from the pies.conf file. ///////////////////////////////////////////////////////////////////// private static void parse_slice(Xml.Node* slice, Pie pie) { string name=""; string icon=""; string command=""; string type=""; bool quickaction = false; // parse all attributes of this node for (Xml.Attr* attribute = slice->properties; attribute != null; attribute = attribute->next) { string attr_name = attribute->name.down(); string attr_content = attribute->children->content; switch (attr_name) { case "name": name = attr_content; break; case "icon": icon = attr_content; break; case "command": command = attr_content; break; case "type": type = attr_content; break; case "quickaction": quickaction = bool.parse(attr_content); break; default: warning("Invalid attribute \"" + attr_name + "\" in element in pies.conf!"); break; } } // create a new Action according to the loaded type Action action = ActionRegistry.create_action(type, name, icon, command, quickaction); if (action != null) pie.add_action(action); } ///////////////////////////////////////////////////////////////////// /// Parses a element from the pies.conf file. ///////////////////////////////////////////////////////////////////// private static void parse_group(Xml.Node* slice, Pie pie) { string type=""; // parse all attributes of this node for (Xml.Attr* attribute = slice->properties; attribute != null; attribute = attribute->next) { string attr_name = attribute->name.down(); string attr_content = attribute->children->content; switch (attr_name) { case "type": type = attr_content; break; default: warning("Invalid attribute \"" + attr_name + "\" in element in pies.conf!"); break; } } ActionGroup group = GroupRegistry.create_group(type, pie.id); if (group != null) pie.add_group(group); } } } Gnome-Pie-0.5.4/src/pies/pie.vala000066400000000000000000000112751204074113200164510ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// This class stores information on a pie. A pie consists of a name, an /// icon name and an unique ID. Furthermore it has an arbitrary amount /// of ActionGroups storing Actions. ///////////////////////////////////////////////////////////////////////// public class Pie : GLib.Object { ///////////////////////////////////////////////////////////////////// /// The name of this Pie. It has not to be unique. ///////////////////////////////////////////////////////////////////// public string name { get; set; } ///////////////////////////////////////////////////////////////////// /// The name of the icon to be used for this Pie. It should exist in /// the users current icon theme, else a standard icon will be used. ///////////////////////////////////////////////////////////////////// public string icon { get; set; } ///////////////////////////////////////////////////////////////////// /// The ID of this Pie. It has to be unique among all Pies. This ID /// consists of three digits when the Pie was created by the user, /// of four digits when it was created dynamically by another class, /// for example by an ActionGroup. ///////////////////////////////////////////////////////////////////// public string id { get; construct; } ///////////////////////////////////////////////////////////////////// /// Stores all ActionGroups of this Pie. ///////////////////////////////////////////////////////////////////// public Gee.ArrayList action_groups { get; private set; } ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all given members. ///////////////////////////////////////////////////////////////////// public Pie(string id, string name, string icon) { GLib.Object(id: id, name: name, icon:icon); this.action_groups = new Gee.ArrayList(); } ///////////////////////////////////////////////////////////////////// /// Should be called when this Pie is deleted, in order to clean up /// stuff created by contained ActionGroups. ///////////////////////////////////////////////////////////////////// public virtual void on_remove() { foreach (var action_group in action_groups) action_group.on_remove(); } ///////////////////////////////////////////////////////////////////// /// Adds an Action to this Pie. ///////////////////////////////////////////////////////////////////// public void add_action(Action action, int at_position = -1) { var group = new ActionGroup(this.id); group.add_action(action); this.add_group(group, at_position); } ///////////////////////////////////////////////////////////////////// /// Adds an ActionGroup to this Pie. ///////////////////////////////////////////////////////////////////// public void add_group(ActionGroup group, int at_position = -1) { if (group.has_quickaction()) { foreach (var action_group in action_groups) action_group.disable_quickactions(); } if (at_position < 0 || at_position >= this.action_groups.size) this.action_groups.add(group); else this.action_groups.insert(at_position, group); } public void remove_group(int index) { if (this.action_groups.size > index) this.action_groups.remove_at(index); } public void move_group(int from, int to) { if (this.action_groups.size > from && this.action_groups.size > to) { var tmp = this.action_groups[from]; this.remove_group(from); this.add_group(tmp, to); } } public void update_group(ActionGroup group, int index) { if (this.action_groups.size > index) this.action_groups.set(index, group); } } } Gnome-Pie-0.5.4/src/pies/pieManager.vala000066400000000000000000000274631204074113200177520ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A static class which stores all Pies. It can be used to add, delete /// and open Pies. ///////////////////////////////////////////////////////////////////////// public class PieManager : GLib.Object { ///////////////////////////////////////////////////////////////////// /// A map of all Pies. It contains both, dynamic and persistent Pies. /// They are associated to their ID's. ///////////////////////////////////////////////////////////////////// public static Gee.HashMap all_pies { get; private set; } ///////////////////////////////////////////////////////////////////// /// Stores all PieWindows which are currently opened. Should be /// rarely more than two... ///////////////////////////////////////////////////////////////////// public static Gee.HashSet opened_windows { get; private set; } ///////////////////////////////////////////////////////////////////// /// Stores all global hotkeys. ///////////////////////////////////////////////////////////////////// private static BindingManager bindings; ///////////////////////////////////////////////////////////////////// /// True, if any pie has the current focus. If it is closing this /// will be false already. ///////////////////////////////////////////////////////////////////// private static bool a_pie_is_active = false; ///////////////////////////////////////////////////////////////////// /// Storing the position of the last Pie. Used for subpies, which are /// opened at their parents location. ///////////////////////////////////////////////////////////////////// private static int last_x = 0; private static int last_y = 0; ///////////////////////////////////////////////////////////////////// /// Initializes all Pies. They are loaded from the pies.conf file. ///////////////////////////////////////////////////////////////////// public static void init() { all_pies = new Gee.HashMap(); opened_windows = new Gee.HashSet(); bindings = new BindingManager(); // load all Pies from th pies.conf file Pies.load(); // open the according pie if it's hotkey is pressed bindings.on_press.connect((id) => { open_pie(id); }); } ///////////////////////////////////////////////////////////////////// /// Opens the Pie with the given ID, if it exists. ///////////////////////////////////////////////////////////////////// public static void open_pie(string id, bool at_last_position = false) { if (!a_pie_is_active) { Pie? pie = all_pies[id]; if (pie != null) { a_pie_is_active = true; var window = new PieWindow(); window.load_pie(pie); if (at_last_position) { window.open_at(last_x, last_y); } else { window.open(); } opened_windows.add(window); window.on_closed.connect(() => { opened_windows.remove(window); if (opened_windows.size == 0) { Icon.clear_cache(); } }); window.on_closing.connect(() => { window.get_center_pos(out last_x, out last_y); a_pie_is_active = false; }); } else { warning("Failed to open pie with ID \"" + id + "\": ID does not exist!"); } } } ///////////////////////////////////////////////////////////////////// /// Returns the hotkey which the Pie with the given ID is bound to. ///////////////////////////////////////////////////////////////////// public static string get_accelerator_of(string id) { return bindings.get_accelerator_of(id); } ///////////////////////////////////////////////////////////////////// /// Returns a human-readable version of the hotkey which the Pie /// with the given ID is bound to. ///////////////////////////////////////////////////////////////////// public static string get_accelerator_label_of(string id) { return bindings.get_accelerator_label_of(id); } ///////////////////////////////////////////////////////////////////// /// Bind the Pie with the given ID to the given trigger. ///////////////////////////////////////////////////////////////////// public static void bind_trigger(Trigger trigger, string id) { bindings.unbind(id); bindings.bind(trigger, id); } ///////////////////////////////////////////////////////////////////// /// 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 true if the pie with the given id opens in the middle of /// the screen. ///////////////////////////////////////////////////////////////////// public static bool get_is_centered(string id) { return bindings.get_is_centered(id); } ///////////////////////////////////////////////////////////////////// /// Returns the name of the Pie with the given ID. ///////////////////////////////////////////////////////////////////// public static string get_name_of(string id) { Pie? pie = all_pies[id]; if (pie == null) return ""; else return pie.name; } ///////////////////////////////////////////////////////////////////// /// 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, Trigger? hotkey, string? desired_id = null) { Pie pie = create_pie(name, icon_name, 100, 999, desired_id); if (hotkey != null) bindings.bind(hotkey, pie.id); create_launcher(pie.id); return pie; } ///////////////////////////////////////////////////////////////////// /// Creates a new Pie which is not displayed in the configuration /// dialog and is not saved. ///////////////////////////////////////////////////////////////////// public static Pie create_dynamic_pie(string name, string icon_name, string? desired_id = null) { return create_pie(name, icon_name, 1000, 9999, desired_id); } ///////////////////////////////////////////////////////////////////// /// Adds a new Pie. Can't be accesd from outer scope. Use /// create_persistent_pie or create_dynamic_pie instead. ///////////////////////////////////////////////////////////////////// private static Pie create_pie(string name, string icon_name, int min_id, int max_id, string? desired_id = null) { var random = new GLib.Rand(); string final_id; if (desired_id == null) final_id = random.int_range(min_id, max_id).to_string(); else { final_id = desired_id; final_id.canon("0123456789", '_'); final_id = final_id.replace("_", ""); int id = int.parse(final_id); if (id < min_id || id > max_id) { final_id = random.int_range(min_id, max_id).to_string(); warning("The ID for pie \"" + name + "\" should be in range %u - %u! Using \"" + final_id + "\" instead of \"" + desired_id + "\"...", min_id, max_id); } } if (all_pies.has_key(final_id)) { var tmp = final_id; var id_number = int.parse(final_id) + 1; if (id_number == max_id+1) id_number = min_id; final_id = id_number.to_string(); warning("Trying to add pie \"" + name + "\": ID \"" + tmp + "\" already exists! Using \"" + final_id + "\" instead..."); return create_pie(name, icon_name, min_id, max_id, final_id); } Pie pie = new Pie(final_id, name, icon_name); all_pies.set(final_id, pie); return pie; } ///////////////////////////////////////////////////////////////////// /// Removes the Pie with the given ID if it exists. Additionally it /// unbinds it's global hotkey. ///////////////////////////////////////////////////////////////////// public static void remove_pie(string id) { if (all_pies.has_key(id)) { all_pies[id].on_remove(); all_pies.unset(id); bindings.unbind(id); if (id.length == 3) remove_launcher(id); } else { warning("Failed to remove pie with ID \"" + id + "\": ID does not exist!"); } } ///////////////////////////////////////////////////////////////////// /// Creates a desktop file for which opens the Pie with given ID. ///////////////////////////////////////////////////////////////////// public static void create_launcher(string id) { if (all_pies.has_key(id)) { Pie? pie = all_pies[id]; string launcher_entry = "#!/usr/bin/env xdg-open\n" + "[Desktop Entry]\n" + "Name=%s\n".printf(pie.name) + "Exec=%s -o %s\n".printf(Paths.executable, pie.id) + "Encoding=UTF-8\n" + "Type=Application\n" + "Icon=%s\n".printf(pie.icon); // create the launcher file string launcher = Paths.launchers + "/%s.desktop".printf(pie.id); try { FileUtils.set_contents(launcher, launcher_entry); FileUtils.chmod(launcher, 0755); } catch (Error e) { warning(e.message); } } } ///////////////////////////////////////////////////////////////////// /// Deletes the desktop file for the Pie with the given ID. ///////////////////////////////////////////////////////////////////// private static void remove_launcher(string id) { string launcher = Paths.launchers + "/%s.desktop".printf(id); if (FileUtils.test(launcher, FileTest.EXISTS)) { FileUtils.remove(launcher); } } } } Gnome-Pie-0.5.4/src/pies/save.vala000066400000000000000000000072341204074113200166320ustar00rootroot00000000000000/* 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 . */ using GLib.Math; namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A helper method which saves pies in a configuration file. ///////////////////////////////////////////////////////////////////////// namespace Pies { ///////////////////////////////////////////////////////////////////// /// Saves all Pies of the PieManager to the pies.conf file. ///////////////////////////////////////////////////////////////////// public void save() { message("Saving Pies to \"" + Paths.pie_config + "\"."); // initializes the XML-Writer var writer = new Xml.TextWriter.filename(Paths.pie_config); writer.set_indent(true); writer.start_document("1.0"); writer.start_element("pies"); // iterate through all Pies foreach (var pie_entry in PieManager.all_pies.entries) { var pie = pie_entry.value; // if it's no dynamically created Pie if (pie.id.length == 3) { int slice_count = 0; // write all attributes of the Pie writer.start_element("pie"); writer.write_attribute("name", pie.name); writer.write_attribute("id", pie.id); writer.write_attribute("icon", pie.icon); writer.write_attribute("hotkey", PieManager.get_accelerator_of(pie.id)); // and all of it's Actions foreach (var group in pie.action_groups) { // if it's a custom ActionGroup if (group.get_type().depth() == 2) { foreach (var action in group.actions) { writer.start_element("slice"); writer.write_attribute("type", ActionRegistry.descriptions[action.get_type().name()].id); if (ActionRegistry.descriptions[action.get_type().name()].icon_name_editable) { writer.write_attribute("name", action.name); writer.write_attribute("icon", action.icon); } writer.write_attribute("command", action.real_command); writer.write_attribute("quickAction", action.is_quickaction ? "true" : "false"); writer.end_element(); ++ slice_count; } } else { writer.start_element("group"); writer.write_attribute("type", GroupRegistry.descriptions[group.get_type().name()].id); writer.end_element(); slice_count += group.actions.size; } } writer.end_element(); } } writer.end_element(); writer.end_document(); } } } Gnome-Pie-0.5.4/src/renderers/000077500000000000000000000000001204074113200160525ustar00rootroot00000000000000Gnome-Pie-0.5.4/src/renderers/centerRenderer.vala000066400000000000000000000202051204074113200216650ustar00rootroot00000000000000/* 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 . */ using GLib.Math; namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// 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); this.alpha = new AnimatedValue.linear(0.0, 1.0, Config.global.theme.fade_in_time); this.color = new Color(); 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); } else { this.activity.reset_target(1.0, Config.global.theme.transition_time); this.caption = active_slice.caption; this.color = active_slice.color; } } ///////////////////////////////////////////////////////////////////// /// 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) ? 0.0 : layer.inactive_rotation_speed; double max_scale = layer.active_scale*this.activity.val + layer.inactive_scale*(1.0-this.activity.val); double max_alpha = layer.active_alpha*this.activity.val + layer.inactive_alpha*(1.0-this.activity.val); double colorize = ((layer.active_colorize == true) ? this.activity.val : 0.0) + ((layer.inactive_colorize == true) ? 1.0 - this.activity.val : 0.0); double max_rotation_speed = active_speed*this.activity.val + inactive_speed*(1.0-this.activity.val); CenterLayer.RotationMode rotation_mode = ((this.activity.val > 0.5) ? layer.active_rotation_mode : layer.inactive_rotation_mode); if (rotation_mode == CenterLayer.RotationMode.TO_MOUSE) { double diff = angle-layer.rotation; max_rotation_speed = layer.active_rotation_speed*this.activity.val + layer.inactive_rotation_speed*(1.0-this.activity.val); double smoothy = fabs(diff) < 0.9 ? fabs(diff) + 0.1 : 1.0; double step = max_rotation_speed*frame_time*smoothy; if (fabs(diff) <= step || fabs(diff) >= 2.0*PI - step) layer.rotation = angle; else { if ((diff > 0 && diff < PI) || diff < -PI) layer.rotation += step; else layer.rotation -= step; } } else if (rotation_mode == CenterLayer.RotationMode.TO_ACTIVE) { max_rotation_speed *= this.activity.val; double slice_angle = parent.slice_count() > 0 ? 2*PI/parent.slice_count() : 0; double direction = (int)((angle+0.5*slice_angle) / (slice_angle))*slice_angle; double diff = direction-layer.rotation; double step = max_rotation_speed*frame_time; if (fabs(diff) <= step || fabs(diff) >= 2.0*PI - step) layer.rotation = direction; else { if ((diff > 0 && diff < PI) || diff < -PI) layer.rotation += step; else layer.rotation -= step; } } else layer.rotation += max_rotation_speed*frame_time; layer.rotation = fmod(layer.rotation+2*PI, 2*PI); 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); ctx.paint_with_alpha(colorize); ctx.set_operator(Cairo.Operator.OVER); ctx.pop_group_to_source(); ctx.paint(); } ctx.restore(); } // draw caption if (Config.global.theme.caption && caption != null && this.activity.val > 0) { ctx.save(); ctx.identity_matrix(); 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(); } } } } Gnome-Pie-0.5.4/src/renderers/pieRenderer.vala000066400000000000000000000276731204074113200212020ustar00rootroot00000000000000/* 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 . */ using GLib.Math; namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// This class renders a Pie. In order to accomplish that, it owns a /// CenterRenderer and some SliceRenderers. ///////////////////////////////////////////////////////////////////////// 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 quickaction { 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; } ///////////////////////////////////////////////////////////////////// /// 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; } ///////////////////////////////////////////////////////////////////// /// True if the pie is currently navigated with the keyboard. This is /// set to false as soon as the mouse moves. ///////////////////////////////////////////////////////////////////// public bool key_board_control { get; set; default=false; } ///////////////////////////////////////////////////////////////////// /// All SliceRenderers used to draw this Pie. ///////////////////////////////////////////////////////////////////// private Gee.ArrayList slices; ///////////////////////////////////////////////////////////////////// /// The renderer for the center of this pie. ///////////////////////////////////////////////////////////////////// private CenterRenderer center; ///////////////////////////////////////////////////////////////////// /// C'tor, initializes members. ///////////////////////////////////////////////////////////////////// public PieRenderer() { this.slices = new Gee.ArrayList(); this.center = new CenterRenderer(this); this.quickaction = -1; this.active_slice = -2; this.size = 0; } ///////////////////////////////////////////////////////////////////// /// Loads a Pie. All members are initialized accordingly. ///////////////////////////////////////////////////////////////////// public void load_pie(Pie pie) { this.slices.clear(); int count = 0; foreach (var group in pie.action_groups) { foreach (var action in group.actions) { var renderer = new SliceRenderer(this); this.slices.add(renderer); renderer.load(action, slices.size-1); if (action.is_quickaction) { this.quickaction = count; } ++count; } } this.turbo_mode = PieManager.get_is_turbo(pie.id); this.set_highlighted_slice(this.quickaction); this.size = (int)fmax(2*Config.global.theme.radius + 2*Config.global.theme.slice_radius*Config.global.theme.max_zoom, 2*Config.global.theme.center_radius); // increase size if there are many slices if (slices.size > 0) { this.size = (int)fmax(this.size, (((Config.global.theme.slice_radius + Config.global.theme.slice_gap)/tan(PI/slices.size)) + Config.global.theme.slice_radius)*2*Config.global.theme.max_zoom); } } ///////////////////////////////////////////////////////////////////// /// Activates the currently active slice. ///////////////////////////////////////////////////////////////////// public void activate() { if (this.active_slice >= 0 && this.active_slice < this.slices.size) { slices[active_slice].activate(); } foreach (var slice in this.slices) slice.fade_out(); center.fade_out(); } ///////////////////////////////////////////////////////////////////// /// Asks all renders to fade out. ///////////////////////////////////////////////////////////////////// public void cancel() { foreach (var slice in this.slices) slice.fade_out(); 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; if (this.active_slice == -1 || this.active_slice == bottom) this.set_highlighted_slice(top); else if (this.active_slice > bottom && this.active_slice < top) this.set_highlighted_slice(this.active_slice+1); else if (this.active_slice != top) this.set_highlighted_slice((this.active_slice-1+this.slice_count())%this.slice_count()); this.key_board_control = true; } ///////////////////////////////////////////////////////////////////// /// 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; if (this.active_slice == -1 || this.active_slice == top) this.set_highlighted_slice(bottom); else if (this.active_slice > bottom && this.active_slice < top) this.set_highlighted_slice(this.active_slice-1); else if (this.active_slice != bottom) this.set_highlighted_slice((this.active_slice+1)%this.slice_count()); this.key_board_control = true; } ///////////////////////////////////////////////////////////////////// /// 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; if (this.active_slice == -1 || this.active_slice == right) this.set_highlighted_slice(left); else if (this.active_slice > left) this.set_highlighted_slice(this.active_slice-1); else if (this.active_slice < left) this.set_highlighted_slice(this.active_slice+1); this.key_board_control = true; } ///////////////////////////////////////////////////////////////////// /// 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; if (this.active_slice == -1 || this.active_slice == left) this.set_highlighted_slice(right); else if (this.active_slice > left) this.set_highlighted_slice((this.active_slice+1)%this.slice_count()); else if (this.active_slice < left && this.active_slice != right) this.set_highlighted_slice((this.active_slice-1+this.slice_count())%this.slice_count()); this.key_board_control = true; } ///////////////////////////////////////////////////////////////////// /// Returns the amount of slices in this pie. ///////////////////////////////////////////////////////////////////// public int slice_count() { return slices.size; } ///////////////////////////////////////////////////////////////////// /// Draws the entire pie. ///////////////////////////////////////////////////////////////////// public void draw(double frame_time, Cairo.Context ctx, int mouse_x, int mouse_y) { if (this.size > 0) { double distance = sqrt(mouse_x*mouse_x + mouse_y*mouse_y); double angle = 0.0; if (this.key_board_control) { angle = 2.0*PI*this.active_slice/(double)slice_count(); } else { if (distance > 0) { angle = acos(mouse_x/distance); if (mouse_y < 0) angle = 2*PI - angle; } int next_active_slice = this.active_slice; if (distance < Config.global.theme.active_radius && this.quickaction >= 0 && this.quickaction < this.slices.size) { next_active_slice = this.quickaction; angle = 2.0*PI*quickaction/(double)slice_count(); } else if (distance > Config.global.theme.active_radius && this.slice_count() > 0) { next_active_slice = (int)(angle*slices.size/(2*PI) + 0.5) % this.slice_count(); } else { next_active_slice = -1; } this.set_highlighted_slice(next_active_slice); } center.draw(frame_time, ctx, angle, distance); foreach (var slice in this.slices) 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()) this.active_slice = index; else if (this.quickaction >= 0) this.active_slice = this.quickaction; else this.active_slice = -1; SliceRenderer? active = (this.active_slice >= 0 && this.active_slice < this.slice_count()) ? this.slices[this.active_slice] : null; center.set_active_slice(active); foreach (var slice in this.slices) slice.set_active_slice(active); } } } } Gnome-Pie-0.5.4/src/renderers/pieWindow.vala000066400000000000000000000321171204074113200206700ustar00rootroot00000000000000/* 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 . */ using GLib.Math; namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// 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(); ///////////////////////////////////////////////////////////////////// /// Signal which gets emitted when the PieWindow is closed. ///////////////////////////////////////////////////////////////////// public signal void on_closed(); ///////////////////////////////////////////////////////////////////// /// The background image used for fake transparency if /// has_compositing is false. ///////////////////////////////////////////////////////////////////// public Image background { get; private set; default=null; } ///////////////////////////////////////////////////////////////////// /// The owned renderer. ///////////////////////////////////////////////////////////////////// private PieRenderer renderer; ///////////////////////////////////////////////////////////////////// /// True, if the Pie is currently fading out. ///////////////////////////////////////////////////////////////////// private bool closing = false; private bool closed = false; ///////////////////////////////////////////////////////////////////// /// A timer used for calculating the frame time. ///////////////////////////////////////////////////////////////////// private GLib.Timer timer; ///////////////////////////////////////////////////////////////////// /// True, if the screen supports compositing. ///////////////////////////////////////////////////////////////////// private bool has_compositing = false; ///////////////////////////////////////////////////////////////////// /// C'tor, sets up the window. ///////////////////////////////////////////////////////////////////// public PieWindow() { this.renderer = new PieRenderer(); this.set_title("Gnome-Pie"); this.set_skip_taskbar_hint(true); this.set_skip_pager_hint(true); this.set_keep_above(true); this.set_type_hint(Gdk.WindowTypeHint.POPUP_MENU); this.set_decorated(false); this.set_resizable(false); this.icon_name = "gnome-pie"; this.set_accept_focus(false); // check for compositing if (this.screen.is_composited()) { #if HAVE_GTK_3 this.set_visual(this.screen.get_rgba_visual()); #else this.set_colormap(this.screen.get_rgba_colormap()); #endif 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.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; }); // remember last pressed key in order to disable key repeat uint last_key = 0; this.key_press_event.connect((e) => { if (e.keyval != last_key) { last_key = e.keyval; this.handle_key_press(e.keyval); } return true; }); // activate on key release if turbo_mode is enabled this.key_release_event.connect((e) => { last_key = 0; 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; }); this.show.connect_after(() => { Gtk.grab_add(this); FocusGrabber.grab(this.get_window(), true, true, false); }); // draw the pie on expose #if HAVE_GTK_3 this.draw.connect(this.draw_window); #else this.expose_event.connect(this.draw_window); #endif } ///////////////////////////////////////////////////////////////////// /// Loads a Pie to be rendered. ///////////////////////////////////////////////////////////////////// public void load_pie(Pie pie) { this.renderer.load_pie(pie); this.set_window_position(pie); 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); this.get_size(out width, out height); this.background = new Image.capture_screen(x, y, width+1, height+1); } // capture the input focus this.show(); // start the timer this.timer = new GLib.Timer(); this.timer.start(); this.queue_draw(); // the main draw loop GLib.Timeout.add((uint)(1000.0/Config.global.refresh_rate), () => { if (this.closed) return false; this.queue_draw(); return this.visible; }); } ///////////////////////////////////////////////////////////////////// /// Opens the window at a given location. ///////////////////////////////////////////////////////////////////// public void open_at(int at_x, int at_y) { this.open(); this.move(at_x-this.width_request/2, at_y-this.height_request/2); } ///////////////////////////////////////////////////////////////////// /// Gets the center position of the window. ///////////////////////////////////////////////////////////////////// public void get_center_pos(out int out_x, out int out_y) { int x=0, y=0, width=0, height=0; this.get_position(out x, out y); this.get_size(out width, out height); out_x = x + width/2; out_y = y + height/2; } ///////////////////////////////////////////////////////////////////// /// Draw the Pie. ///////////////////////////////////////////////////////////////////// #if HAVE_GTK_3 private bool draw_window(Cairo.Context ctx) { #else private bool draw_window(Gtk.Widget da, Gdk.EventExpose event) { // clear the window var ctx = Gdk.cairo_create(this.get_window()); #endif // paint the background image if there is no compositing if (this.has_compositing) { ctx.set_operator (Cairo.Operator.CLEAR); ctx.paint(); ctx.set_operator (Cairo.Operator.OVER); } else { ctx.set_operator (Cairo.Operator.OVER); ctx.set_source_surface(background.surface, -1, -1); 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(); Gtk.grab_remove(this); FocusGrabber.ungrab(); this.renderer.activate(); GLib.Timeout.add((uint)(Config.global.theme.fade_out_time*1000), () => { this.closed = true; this.on_closed(); this.destroy(); return false; }); } } ///////////////////////////////////////////////////////////////////// /// Activates no slice and closes the PieWindow. ///////////////////////////////////////////////////////////////////// private void cancel() { if (!this.closing) { this.closing = true; this.on_closing(); Gtk.grab_remove(this); FocusGrabber.ungrab(); this.renderer.cancel(); GLib.Timeout.add((uint)(Config.global.theme.fade_out_time*1000), () => { this.closed = true; this.on_closed(); this.destroy(); return false; }); } } ///////////////////////////////////////////////////////////////////// /// Sets the position of the window to the center of the screen or to /// the mouse. ///////////////////////////////////////////////////////////////////// private void set_window_position(Pie pie) { if(PieManager.get_is_centered(pie.id)) this.set_position(Gtk.WindowPosition.CENTER); else this.set_position(Gtk.WindowPosition.MOUSE); } ///////////////////////////////////////////////////////////////////// /// 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 (!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(); else if (Gdk.keyval_name(key) == "Right") this.renderer.select_right(); else if (Gdk.keyval_name(key) == "Alt_L") this.renderer.show_hotkeys = true; else { int index = -1; if (key >= 48 && key <= 57) index = (int)key - 48; else if (key >= 97 && key <= 122) index = (int)key - 87; else if (key >= 65 && key <= 90) index = (int)key - 55; if (index >= 0 && index < this.renderer.slice_count()) { this.renderer.key_board_control = true; this.renderer.set_highlighted_slice(index); if (this.renderer.active_slice == index) { GLib.Timeout.add((uint)(Config.global.theme.transition_time*1000.0), ()=> { this.activate_slice(); return false; }); } } } } } ///////////////////////////////////////////////////////////////////// /// Do some useful stuff when keys are released. ///////////////////////////////////////////////////////////////////// private void handle_key_release(uint key) { if (!this.renderer.turbo_mode) { if (Gdk.keyval_name(key) == "Alt_L") this.renderer.show_hotkeys = false; } } } } Gnome-Pie-0.5.4/src/renderers/sliceRenderer.vala000066400000000000000000000302311204074113200215040ustar00rootroot00000000000000/* 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 . */ using GLib.Math; namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// 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; ///////////////////////////////////////////////////////////////////// /// 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 private AnimatedValue wobble; // for organic wobbling ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all AnimatedValues. ///////////////////////////////////////////////////////////////////// public SliceRenderer(PieRenderer parent) { this.parent = parent; this.fade = new AnimatedValue.linear(0.0, 0.0, Config.global.theme.transition_time); this.wobble = new AnimatedValue.linear(0.0, 0.0, Config.global.theme.transition_time); this.alpha = new AnimatedValue.linear(0.0, 1.0, Config.global.theme.fade_in_time); this.scale = new AnimatedValue.cubic(AnimatedValue.Direction.OUT, 1.0/Config.global.theme.max_zoom, 1.0/Config.global.theme.max_zoom, Config.global.theme.transition_time, Config.global.theme.springiness); this.fade_scale = new AnimatedValue.cubic(AnimatedValue.Direction.OUT, Config.global.theme.fade_in_zoom, 1.0, Config.global.theme.fade_in_time, Config.global.theme.springiness); this.fade_rotation = new AnimatedValue.cubic(AnimatedValue.Direction.OUT, 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; this.action = action; if (Config.global.theme.caption) this.caption = new RenderedText(action.name, Config.global.theme.caption_width, Config.global.theme.caption_height, Config.global.theme.caption_font, Config.global.theme.caption_color, Config.global.global_scale); this.active_icon = new ThemedIcon(action.name, action.icon, true); this.inactive_icon = new ThemedIcon(action.name, action.icon, false); this.color = new Color.from_icon(this.active_icon); string hotkey_label = ""; if (position < 10) { hotkey_label = "%u".printf(position); } else if (position < 36) { hotkey_label = "%c".printf((char)(55 + position)); } this.hotkey = new RenderedText(hotkey_label, (int)Config.global.theme.slice_radius*2, (int)Config.global.theme.slice_radius*2, "sans 20", Config.global.theme.caption_color, Config.global.global_scale); } ///////////////////////////////////////////////////////////////////// /// 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, this.fade_scale.val, Config.global.theme.fade_out_zoom, Config.global.theme.fade_out_time, Config.global.theme.springiness); this.fade_rotation = new AnimatedValue.cubic(AnimatedValue.Direction.IN, this.fade_rotation.val, Config.global.theme.fade_out_rotation, 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); } else { 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) { // update the AnimatedValues this.scale.update(frame_time); this.alpha.update(frame_time); this.fade.update(frame_time); this.fade_scale.update(frame_time); this.fade_rotation.update(frame_time); this.wobble.update(frame_time); double direction = 2.0 * PI * position/parent.slice_count() + this.fade_rotation.val; double max_scale = 1.0/Config.global.theme.max_zoom; double diff = fabs(angle-direction); if (diff > PI) diff = 2 * PI - diff; active = ((parent.active_slice >= 0) && (diff < PI/parent.slice_count())); if (parent.active_slice >= 0) { double wobble = Config.global.theme.wobble*diff/PI*(1-diff/PI); if ((direction < angle && direction > angle - PI) || direction > PI+angle) { this.wobble.reset_target(-wobble, Config.global.theme.transition_time*0.5); } else { this.wobble.reset_target(wobble, Config.global.theme.transition_time*0.5); } } else { this.wobble.reset_target(0, Config.global.theme.transition_time*0.5); } direction += this.wobble.val; if (diff < 2 * PI * Config.global.theme.zoom_range) max_scale = (Config.global.theme.max_zoom/(diff * (Config.global.theme.max_zoom - 1) /(2 * PI * Config.global.theme.zoom_range) + 1)) /Config.global.theme.max_zoom; max_scale = (parent.active_slice >= 0 ? max_scale : 1.0/Config.global.theme.max_zoom); 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); 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); ctx.push_group(); 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)); if (this.parent.show_hotkeys) { ctx.set_operator(Cairo.Operator.ATOP); ctx.set_source_rgba(0, 0, 0, 0.5); ctx.paint(); } ctx.set_operator(Cairo.Operator.OVER); ctx.pop_group_to_source(); ctx.paint(); // draw hotkeys if necassary if (this.parent.show_hotkeys) this.hotkey.paint_on(ctx, 1.0); ctx.restore(); } } } Gnome-Pie-0.5.4/src/themes/000077500000000000000000000000001204074113200153465ustar00rootroot00000000000000Gnome-Pie-0.5.4/src/themes/centerLayer.vala000066400000000000000000000113041204074113200204670ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// This class representing a layer of the center of a pie. Each theme /// may have plenty of them. ///////////////////////////////////////////////////////////////////////// public class CenterLayer : GLib.Object { ///////////////////////////////////////////////////////////////////// /// Possible rotation modes. /// AUTO: Turns the layer continously. /// TO_MOUSE: Turns the layer always to the pointer. /// TO_ACTIVE: Turns the layer to the active slice. ///////////////////////////////////////////////////////////////////// public enum RotationMode {AUTO, TO_MOUSE, TO_ACTIVE} ///////////////////////////////////////////////////////////////////// /// Information on the contained image. ///////////////////////////////////////////////////////////////////// public Image image {get; private set;} public string image_file; ///////////////////////////////////////////////////////////////////// /// Properties for the active state of this layer. ///////////////////////////////////////////////////////////////////// public double active_scale {get; private set;} public double active_rotation_speed {get; private set;} public double active_alpha {get; private set;} public bool active_colorize {get; private set;} public RotationMode active_rotation_mode {get; private set;} ///////////////////////////////////////////////////////////////////// /// Properties for the inactive state of this layer. ///////////////////////////////////////////////////////////////////// public double inactive_scale {get; private set;} public double inactive_rotation_speed {get; private set;} public double inactive_alpha {get; private set;} public bool inactive_colorize {get; private set;} public RotationMode inactive_rotation_mode {get; private set;} ///////////////////////////////////////////////////////////////////// /// The current rotation of this layer. TODO: Remove this. ///////////////////////////////////////////////////////////////////// public double rotation {get; set;} ///////////////////////////////////////////////////////////////////// /// Helper variable for image loading. ///////////////////////////////////////////////////////////////////// private int center_radius; ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all members of the layer. ///////////////////////////////////////////////////////////////////// public CenterLayer(string image_file, int center_radius, double active_scale, double active_rotation_speed, double active_alpha, bool active_colorize, RotationMode active_rotation_mode, double inactive_scale, double inactive_rotation_speed, double inactive_alpha, bool inactive_colorize, RotationMode inactive_rotation_mode) { this.image_file = image_file; this.center_radius = center_radius; this.active_scale = active_scale; this.active_rotation_speed = active_rotation_speed; this.active_alpha = active_alpha; this.active_colorize = active_colorize; this.active_rotation_mode = active_rotation_mode; this.inactive_scale = inactive_scale; this.inactive_rotation_speed = inactive_rotation_speed; this.inactive_alpha = inactive_alpha; this.inactive_colorize = inactive_colorize; this.inactive_rotation_mode = inactive_rotation_mode; this.rotation = 0.0; } ///////////////////////////////////////////////////////////////////// /// Loads the contained image. ///////////////////////////////////////////////////////////////////// public void load_image() { this.image = new Image.from_file_at_size(image_file, 2*center_radius, 2*center_radius); } } } Gnome-Pie-0.5.4/src/themes/sliceLayer.vala000066400000000000000000000074221204074113200203140ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// This class representing a layer of a slice of a pie. Each theme may /// have plenty of them. ///////////////////////////////////////////////////////////////////////// public class SliceLayer : GLib.Object { public enum Type { FILE, ICON, CAPTION } public enum Visibility { ANY, WITH_CAPTION, WITHOUT_CAPTION } public Type layer_type { get; private set; } public Visibility visibility { get; private set; } ///////////////////////////////////////////////////////////////////// /// Information on the contained image. ///////////////////////////////////////////////////////////////////// public Image image {get; set;} ///////////////////////////////////////////////////////////////////// /// Properties of this layer. ///////////////////////////////////////////////////////////////////// public string icon_file {get; private set; default="";} public bool colorize {get; private set; default=false;} public int icon_size {get; private set; default=1;} public string font {get; private set; default="";} public int width {get; private set; default=0;} public int height {get; private set; default=0;} public int position {get; private set; default=0;} public Color color {get; private set; default=new Color();} ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all members of the layer. ///////////////////////////////////////////////////////////////////// public SliceLayer.file(string icon_file, int icon_size, bool colorize, Visibility visibility) { this.layer_type = Type.FILE; this.icon_file = icon_file; this.colorize = colorize; this.icon_size = icon_size; this.visibility = visibility; } public SliceLayer.icon(string icon_file, int icon_size, bool colorize, Visibility visibility) { this.layer_type = Type.ICON; this.icon_file = icon_file; this.colorize = colorize; this.icon_size = icon_size; this.visibility = visibility; } public SliceLayer.caption(string font, int width, int height, int position, Color color, bool colorize, Visibility visibility) { this.layer_type = Type.CAPTION; this.font = font; this.width = width; this.height = height; this.position = position; this.color = color; this.visibility = visibility; this.colorize = colorize; } ///////////////////////////////////////////////////////////////////// /// Loads the contained image. ///////////////////////////////////////////////////////////////////// public void load_image() { this.image = null; if (this.icon_file == "" && this.layer_type == Type.ICON) this.image = new Image.empty(this.icon_size, this.icon_size, new Color.from_rgb(1, 1, 1)); else if (this.icon_file != "") this.image = new Image.from_file_at_size(this.icon_file, this.icon_size, this.icon_size); } } } Gnome-Pie-0.5.4/src/themes/theme.vala000066400000000000000000000623501204074113200173230ustar00rootroot00000000000000/* 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 . */ using GLib.Math; namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A theme of Gnome-Pie. Can be loaded from XML-Files. ///////////////////////////////////////////////////////////////////////// public class Theme : GLib.Object { ///////////////////////////////////////////////////////////////////// /// Properties of a theme. ///////////////////////////////////////////////////////////////////// public string directory {get; private set; default="";} public string name {get; private set; default="";} public string description {get; private set; default="";} public string author {get; private set; default="";} public string email {get; private set; default="";} public double radius {get; private set; default=150;} public double max_zoom {get; private set; default=1.2;} public double zoom_range {get; private set; default=0.2;} public double transition_time {get; private set; default=0.5;} public double wobble {get; private set; default=0.0;} public double fade_in_time {get; private set; default=0.2;} public double fade_out_time {get; private set; default=0.1;} public double fade_in_zoom {get; private set; default=1.0;} public double fade_out_zoom {get; private set; default=1.0;} public double fade_in_rotation {get; private set; default=0.0;} public double fade_out_rotation{get; private set; default=0.0;} public double springiness {get; private set; default=0.0;} public double center_radius {get; private set; default=90.0;} public double active_radius {get; private set; default=45.0;} public double slice_radius {get; private set; default=32.0;} public double slice_gap {get; private set; default=14.0;} public bool has_slice_captions {get; private set; default=false;} public bool caption {get; private set; default=false;} public string caption_font {get; private set; default="sans 12";} public int caption_width {get; private set; default=100;} public int caption_height {get; private set; default=100;} public double caption_position {get; private set; default=0.0;} public Color caption_color {get; private set; default=new Color();} public Icon preview_icon {get; private set; default=new Icon("gnome-pie", 36);} public Gee.ArrayList center_layers {get; private set;} public Gee.ArrayList active_slice_layers {get; private set;} public Gee.ArrayList inactive_slice_layers {get; private set;} ///////////////////////////////////////////////////////////////////// /// C'tor, creates a theme object for a given theme directory. This /// directory should contain a theme.xml file. ///////////////////////////////////////////////////////////////////// public Theme(string dir) { this.center_layers = new Gee.ArrayList(); this.active_slice_layers = new Gee.ArrayList(); this.inactive_slice_layers = new Gee.ArrayList(); this.directory = dir; } ///////////////////////////////////////////////////////////////////// /// Loads the theme from its directory. Images have to be loaded /// explicitly. ///////////////////////////////////////////////////////////////////// public bool load() { this.center_layers.clear(); this.active_slice_layers.clear(); this.inactive_slice_layers.clear(); this.preview_icon = new Icon(this.directory + "/preview.png", 36); Xml.Parser.init(); string path = this.directory + "/theme.xml"; Xml.Doc* themeXML = Xml.Parser.parse_file(path); if (themeXML == null) { warning("Failed to add theme: \"" + path + "\" not found!"); return false; } Xml.Node* root = themeXML->get_root_element(); if (root == null) { delete themeXML; warning("Failed to add theme: \"theme.xml\" is empty!"); return false; } this.parse_root(root); delete themeXML; Xml.Parser.cleanup(); this.radius *= max_zoom; return true; } ///////////////////////////////////////////////////////////////////// /// Loads all images of the theme. ///////////////////////////////////////////////////////////////////// public void load_images() { foreach (var layer in this.center_layers) layer.load_image(); foreach (var layer in this.active_slice_layers) layer.load_image(); foreach (var layer in this.inactive_slice_layers) layer.load_image(); } ///////////////////////////////////////////////////////////////////// /// The following methods parse specific parts of the theme file. /// Nothing special here, just some boring code. ///////////////////////////////////////////////////////////////////// private void parse_root(Xml.Node* root) { for (Xml.Attr* attribute = root->properties; attribute != null; attribute = attribute->next) { string attr_name = attribute->name.down(); string attr_content = attribute->children->content; switch (attr_name) { case "name": name = attr_content; break; case "description": description = attr_content; break; case "email": email = attr_content; break; case "author": author = attr_content; break; default: warning("Invalid attribute \"" + attr_name + "\" in element!"); break; } } for (Xml.Node* node = root->children; node != null; node = node->next) { if (node->type == Xml.ElementType.ELEMENT_NODE) { parse_pie(node); } } } ///////////////////////////////////////////////////////////////////// /// Parses a element from the theme.xml file. ///////////////////////////////////////////////////////////////////// private void parse_pie(Xml.Node* pie) { for (Xml.Attr* attribute = pie->properties; attribute != null; attribute = attribute->next) { string attr_name = attribute->name.down(); string attr_content = attribute->children->content; switch (attr_name) { case "radius": radius = double.parse(attr_content) * Config.global.global_scale; break; case "maxzoom": max_zoom = double.parse(attr_content); break; case "zoomrange": zoom_range = double.parse(attr_content); break; case "transitiontime": transition_time = double.parse(attr_content); break; case "wobble": wobble = double.parse(attr_content); break; case "fadeintime": fade_in_time = double.parse(attr_content); break; case "fadeouttime": fade_out_time = double.parse(attr_content); break; case "fadeinzoom": fade_in_zoom = double.parse(attr_content); break; case "fadeoutzoom": fade_out_zoom = double.parse(attr_content); break; case "fadeinrotation": fade_in_rotation = double.parse(attr_content); break; case "fadeoutrotation": fade_out_rotation = double.parse(attr_content); break; case "springiness": springiness = double.parse(attr_content); break; default: warning("Invalid attribute \"" + attr_name + "\" in element!"); break; } } for (Xml.Node* node = pie->children; node != null; node = node->next) { if (node->type == Xml.ElementType.ELEMENT_NODE) { string element_name = node->name.down(); switch (element_name) { case "center": parse_center(node); break; case "slices": parse_slices(node); break; case "caption": caption = true; parse_caption(node); break; default: warning("Invalid child element \"" + element_name + "\" in element!"); break; } } } } ///////////////////////////////////////////////////////////////////// /// Parses a
element from the theme.xml file. ///////////////////////////////////////////////////////////////////// private void parse_center(Xml.Node* center) { for (Xml.Attr* attribute = center->properties; attribute != null; attribute = attribute->next) { string attr_name = attribute->name.down(); string attr_content = attribute->children->content; switch (attr_name) { case "radius": center_radius = double.parse(attr_content) * Config.global.global_scale; break; case "activeradius": active_radius = double.parse(attr_content) * Config.global.global_scale; break; default: warning("Invalid attribute \"" + attr_name + "\" in
element!"); break; } } for (Xml.Node* node = center->children; node != null; node = node->next) { if (node->type == Xml.ElementType.ELEMENT_NODE) { string element_name = node->name.down(); if (element_name == "center_layer") { parse_center_layer(node); } else { warning("Invalid child element \"" + element_name + "\" in
element!"); } } } } ///////////////////////////////////////////////////////////////////// /// Parses a element from the theme.xml file. ///////////////////////////////////////////////////////////////////// private void parse_slices(Xml.Node* slices) { for (Xml.Attr* attribute = slices->properties; attribute != null; attribute = attribute->next) { string attr_name = attribute->name.down(); string attr_content = attribute->children->content; switch (attr_name) { case "radius": slice_radius = double.parse(attr_content) * Config.global.global_scale; break; case "mingap": slice_gap = double.parse(attr_content) * Config.global.global_scale; break; default: warning("Invalid attribute \"" + attr_name + "\" in element!"); break; } } for (Xml.Node* node = slices->children; node != null; node = node->next) { if (node->type == Xml.ElementType.ELEMENT_NODE) { string element_name = node->name.down(); if (element_name == "activeslice" || element_name == "inactiveslice") { parse_slice_layers(node); } else { warning("Invalid child element \"" + element_name + "\" in element!"); } } } } ///////////////////////////////////////////////////////////////////// /// Parses a element from the theme.xml file. ///////////////////////////////////////////////////////////////////// private void parse_center_layer(Xml.Node* layer) { string file = ""; double active_rotation_speed = 0.0; double inactive_rotation_speed = 0.0; double active_scale = 1.0; double inactive_scale = 1.0; double active_alpha = 1.0; double inactive_alpha = 1.0; bool active_colorize = false; bool inactive_colorize = false; CenterLayer.RotationMode active_rotation_mode = CenterLayer.RotationMode.AUTO; CenterLayer.RotationMode inactive_rotation_mode = CenterLayer.RotationMode.AUTO; for (Xml.Attr* attribute = layer->properties; attribute != null; attribute = attribute->next) { string attr_name = attribute->name.down(); string attr_content = attribute->children->content; switch (attr_name) { case "file": file = attr_content; break; case "active_scale": active_scale = double.parse(attr_content); break; case "active_alpha": active_alpha = double.parse(attr_content); break; case "active_rotationmode": switch (attr_content.down()) { case "auto": active_rotation_mode = CenterLayer.RotationMode.AUTO; break; case "turn_to_active": active_rotation_mode = CenterLayer.RotationMode.TO_ACTIVE; break; case "turn_to_mouse": active_rotation_mode = CenterLayer.RotationMode.TO_MOUSE; break; default: warning("Invalid value \"" + attr_content + "\" for attribute \"" + attr_name + "\" in element!"); break; } break; case "active_rotationspeed": active_rotation_speed = double.parse(attr_content); break; case "active_colorize": active_colorize = bool.parse(attr_content); break; case "inactive_scale": inactive_scale = double.parse(attr_content); break; case "inactive_alpha": inactive_alpha = double.parse(attr_content); break; case "inactive_rotationmode": switch (attr_content.down()) { case "auto": inactive_rotation_mode = CenterLayer.RotationMode.AUTO; break; case "turn_to_active": inactive_rotation_mode = CenterLayer.RotationMode.TO_ACTIVE; break; case "turn_to_mouse": inactive_rotation_mode = CenterLayer.RotationMode.TO_MOUSE; break; default: warning("Invalid value \"" + attr_content + "\" for attribute \"" + attr_name + "\" in element!"); break; } break; case "inactive_rotationspeed": inactive_rotation_speed = double.parse(attr_content); break; case "inactive_colorize": inactive_colorize = bool.parse(attr_content); break; default: warning("Invalid attribute \"" + attr_name + "\" in element!"); break; } } double max_scale = GLib.Math.fmax(active_scale, inactive_scale); center_layers.add(new CenterLayer(directory + "/" + file, (int)(center_radius*max_scale), active_scale/max_scale, active_rotation_speed, active_alpha, active_colorize, active_rotation_mode, inactive_scale/max_scale, inactive_rotation_speed, inactive_alpha, inactive_colorize, inactive_rotation_mode)); } ///////////////////////////////////////////////////////////////////// /// Parses a element from the theme.xml file. ///////////////////////////////////////////////////////////////////// private void parse_slice_layers(Xml.Node* slice) { for (Xml.Node* layer = slice->children; layer != null; layer = layer->next) { if (layer->type == Xml.ElementType.ELEMENT_NODE) { string element_name = layer->name.down(); if (element_name == "slice_layer") { string file = ""; double scale = 1.0; SliceLayer.Type type = SliceLayer.Type.FILE; SliceLayer.Visibility visibility = SliceLayer.Visibility.ANY; bool colorize = false; string slice_caption_font = "sans 8"; int slice_caption_width = 50; int slice_caption_height = 20; int pos_x = 0; int pos_y = 0; Color slice_caption_color = new Color.from_rgb(1.0f, 1.0f, 1.0f); for (Xml.Attr* attribute = layer->properties; attribute != null; attribute = attribute->next) { string attr_name = attribute->name.down(); string attr_content = attribute->children->content; switch (attr_name) { case "file": file = attr_content; break; case "scale": scale = double.parse(attr_content); break; case "type": if (attr_content == "icon") type = SliceLayer.Type.ICON; else if (attr_content == "caption") type = SliceLayer.Type.CAPTION; else if (attr_content != "file") warning("Invalid attribute content " + attr_content + " for attribute " + attr_name + " in element!"); break; case "colorize": colorize = bool.parse(attr_content); break; case "font": slice_caption_font = attr_content; break; case "width": slice_caption_width = (int)(int.parse(attr_content) * Config.global.global_scale); if (slice_caption_width % 2 == 1) --slice_caption_width; break; case "height": slice_caption_height = (int)(int.parse(attr_content) * Config.global.global_scale); if (slice_caption_height % 2 == 1) --slice_caption_height; break; case "x": pos_x = (int)(double.parse(attr_content) * Config.global.global_scale); break; case "y": pos_y = (int)(double.parse(attr_content) * Config.global.global_scale); break; case "color": slice_caption_color = new Color.from_string(attr_content); break; case "visibility": if (attr_content == "without_caption") visibility = SliceLayer.Visibility.WITHOUT_CAPTION; else if (attr_content == "with_caption") { this.has_slice_captions = true; visibility = SliceLayer.Visibility.WITH_CAPTION; } else if (attr_content != "any") warning("Invalid attribute content " + attr_content + " for attribute " + attr_name + " in element!"); break; default: warning("Invalid attribute \"" + attr_name + "\" in element!"); break; } } if (file != "") file = directory + "/" + file; int size = 2*(int)(slice_radius*scale*max_zoom); if (slice->name.down() == "activeslice") { if (type == SliceLayer.Type.ICON) active_slice_layers.add(new SliceLayer.icon(file, size, colorize, visibility)); else if (type == SliceLayer.Type.CAPTION) active_slice_layers.add(new SliceLayer.caption(slice_caption_font, slice_caption_width, slice_caption_height, pos_y, slice_caption_color, colorize, visibility)); else active_slice_layers.add(new SliceLayer.file(file, size, colorize, visibility)); } else { if (type == SliceLayer.Type.ICON) inactive_slice_layers.add(new SliceLayer.icon(file, size, colorize, visibility)); else if (type == SliceLayer.Type.CAPTION) inactive_slice_layers.add(new SliceLayer.caption(slice_caption_font, slice_caption_width, slice_caption_height, pos_y, slice_caption_color, colorize, visibility)); else inactive_slice_layers.add(new SliceLayer.file(file, size, colorize, visibility)); } } else { warning("Invalid child element \"" + element_name + "\" in <" + slice->name + "> element!"); } } } } ///////////////////////////////////////////////////////////////////// /// Parses a element from the theme.xml file. ///////////////////////////////////////////////////////////////////// private void parse_caption(Xml.Node* caption) { for (Xml.Attr* attribute = caption->properties; attribute != null; attribute = attribute->next) { string attr_name = attribute->name.down(); string attr_content = attribute->children->content; switch (attr_name) { case "font": caption_font = attr_content; break; case "width": caption_width = (int)(int.parse(attr_content) * Config.global.global_scale); if (caption_width % 2 == 1) --caption_width; break; case "height": caption_height = (int)(int.parse(attr_content) * Config.global.global_scale); if (caption_height % 2 == 1) --caption_height; break; case "position": caption_position = double.parse(attr_content) * Config.global.global_scale; break; case "color": caption_color = new Color.from_string(attr_content); break; default: warning("Invalid attribute \"" + attr_name + "\" in element!"); break; } } } } } Gnome-Pie-0.5.4/src/utilities/000077500000000000000000000000001204074113200160745ustar00rootroot00000000000000Gnome-Pie-0.5.4/src/utilities/animatedValue.vala000066400000000000000000000173511204074113200215270ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A class which interpolates smoothly between to given values. /// Duration and interpolation mode can be specified. ///////////////////////////////////////////////////////////////////////// public class AnimatedValue : GLib.Object { ///////////////////////////////////////////////////////////////////// /// The direction of the interpolation. ///////////////////////////////////////////////////////////////////// public enum Direction { IN, OUT, IN_OUT, OUT_IN } ///////////////////////////////////////////////////////////////////// /// Type of the interpolation, linear or cubic. ///////////////////////////////////////////////////////////////////// private enum Type { LINEAR, CUBIC } ///////////////////////////////////////////////////////////////////// /// Current value, interpolated. ///////////////////////////////////////////////////////////////////// public double val { get; private set; } ///////////////////////////////////////////////////////////////////// /// Starting value of the interpolation. ///////////////////////////////////////////////////////////////////// public double start { get; private set; default=0.0; } ///////////////////////////////////////////////////////////////////// /// Final value of the interpolation. ///////////////////////////////////////////////////////////////////// public double end { get; private set; default=0.0; } ///////////////////////////////////////////////////////////////////// /// The current state. In range 0 .. 1 ///////////////////////////////////////////////////////////////////// private double state = 0.0; ///////////////////////////////////////////////////////////////////// /// Duration of the interpolation. Should be in the same unit as /// taken for the update() method. ///////////////////////////////////////////////////////////////////// private double duration = 0.0; ///////////////////////////////////////////////////////////////////// /// The amount of over-shooting of the cubicly interpolated value. ///////////////////////////////////////////////////////////////////// private double multiplier = 0.0; ///////////////////////////////////////////////////////////////////// /// Type of the interpolation, linear or cubic. ///////////////////////////////////////////////////////////////////// private Type type = Type.LINEAR; ///////////////////////////////////////////////////////////////////// /// The direction of the interpolation. ///////////////////////////////////////////////////////////////////// private Direction direction = Direction.IN; ///////////////////////////////////////////////////////////////////// /// Creates a new linearly interpolated value. ///////////////////////////////////////////////////////////////////// public AnimatedValue.linear(double start, double end, double duration) { this.val = start; this.start = start; this.end = end; this.duration = duration; } ///////////////////////////////////////////////////////////////////// /// Creates a new cubicly interpolated value. ///////////////////////////////////////////////////////////////////// public AnimatedValue.cubic(Direction direction, double start, double end, double duration, double multiplier = 0) { this.val = start; this.start = start; this.end = end; this.duration = duration; this.direction = direction; this.type = Type.CUBIC; this.multiplier = multiplier; } ///////////////////////////////////////////////////////////////////// /// Resets the final value of the interpolation to a new value. The /// current state is taken for the beginning from now. ///////////////////////////////////////////////////////////////////// public void reset_target(double end, double duration) { this.end = end; this.duration = duration; this.start = this.val; if (duration == 0.0) { this.val = end; this.state = 1.0; } else { this.state = 0.0; } } ///////////////////////////////////////////////////////////////////// /// Updates the interpolated value according to it's type. ///////////////////////////////////////////////////////////////////// public void update(double time) { this.state += time/this.duration; if (this.state < 1) { switch (this.type) { case Type.LINEAR: this.val = update_linear(); break; case Type.CUBIC: switch (this.direction) { case Direction.IN: this.val = update_ease_in(); return; case Direction.OUT: this.val = update_ease_out(); return; case Direction.IN_OUT: this.val = update_ease_in_out(); return; case Direction.OUT_IN: this.val = update_ease_out_in(); return; } break; } } else if (this.val != this.end) { this.val = this.end; } } ///////////////////////////////////////////////////////////////////// /// The following equations are based on Robert Penner's easing /// equations. See (http://www.robertpenner.com/easing/) and their /// adaption by Zeh Fernando, Nate Chatellier and Arthur Debert for /// the Tweener class. See (http://code.google.com/p/tweener/). ///////////////////////////////////////////////////////////////////// private double update_linear(double t = this.state, double s = this.start, double e = this.end) { return (s + t*(e - s)); } private double update_ease_in(double t = this.state, double s = this.start, double e = this.end) { return (s + (t*t*((multiplier+1)*t-multiplier))*(e - s)); } private double update_ease_out(double t = this.state, double s = this.start, double e = this.end) { return (s + ((t-1) * (t-1) * ((multiplier+1)*(t-1)+multiplier) + 1) * (e - s)); } private double update_ease_in_out(double t = this.state, double s = this.start, double e = this.end) { if (this.state < 0.5) return update_ease_in(t*2, s, e - (e-s)*0.5); else return update_ease_out(t*2-1, s + (e-s)*0.5, e); } private double update_ease_out_in(double t = this.state, double s = this.start, double e = this.end) { if (this.state < 0.5) return update_ease_out(t*2, s, e - (e-s)*0.5); else return update_ease_in(t*2-1, s + (e-s)*0.5, e); } } } Gnome-Pie-0.5.4/src/utilities/bindingManager.vala000066400000000000000000000315161204074113200216540ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// Globally binds key stroke to given ID's. When one of the bound /// strokes is invoked, a signal with the according ID is emitted. ///////////////////////////////////////////////////////////////////////// public class BindingManager : GLib.Object { ///////////////////////////////////////////////////////////////////// /// Called when a stored binding is invoked. The according ID is /// passed as argument. ///////////////////////////////////////////////////////////////////// public signal void on_press(string id); ///////////////////////////////////////////////////////////////////// /// A list storing bindings, which are invoked even if Gnome-Pie /// doesn't have the current focus ///////////////////////////////////////////////////////////////////// private Gee.List bindings = new Gee.ArrayList(); ///////////////////////////////////////////////////////////////////// /// Ignored modifier masks, used to grab all keys even if these locks /// are active. ///////////////////////////////////////////////////////////////////// private static uint[] lock_modifiers = { 0, Gdk.ModifierType.MOD2_MASK, Gdk.ModifierType.LOCK_MASK, Gdk.ModifierType.MOD5_MASK, Gdk.ModifierType.MOD2_MASK|Gdk.ModifierType.LOCK_MASK, Gdk.ModifierType.MOD2_MASK|Gdk.ModifierType.MOD5_MASK, Gdk.ModifierType.LOCK_MASK|Gdk.ModifierType.MOD5_MASK, Gdk.ModifierType.MOD2_MASK|Gdk.ModifierType.LOCK_MASK|Gdk.ModifierType.MOD5_MASK }; ///////////////////////////////////////////////////////////////////// /// Some variables to remember which delayed binding was delayed. /// When the delay passes without another event indicating that the /// Trigger was released, the stored binding will be activated. ///////////////////////////////////////////////////////////////////// private uint32 delayed_count = 0; private X.Event? delayed_event = null; private Keybinding? delayed_binding = null; ///////////////////////////////////////////////////////////////////// /// Helper class to store keybinding ///////////////////////////////////////////////////////////////////// private class Keybinding { public Keybinding(Trigger trigger, string id) { this.trigger = trigger; this.id = id; } public Trigger trigger { get; set; } public string id { get; set; } } ///////////////////////////////////////////////////////////////////// /// C'tor adds the event filter to the root window. ///////////////////////////////////////////////////////////////////// public BindingManager() { // init filter to retrieve X.Events Gdk.Window rootwin = Gdk.get_default_root_window(); if(rootwin != null) { rootwin.add_filter(event_filter); } } ///////////////////////////////////////////////////////////////////// /// Binds the ID to the given accelerator. ///////////////////////////////////////////////////////////////////// public void bind(Trigger trigger, string id) { if(trigger.key_code != 0) { X.Display display = Gdk.x11_get_default_xdisplay(); X.ID xid = Gdk.x11_get_default_root_xwindow(); Gdk.error_trap_push(); foreach(uint lock_modifier in lock_modifiers) { 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(trigger, id); bindings.add(binding); display.flush(); } } ///////////////////////////////////////////////////////////////////// /// Unbinds the accelerator of the given ID. ///////////////////////////////////////////////////////////////////// public void unbind(string id) { X.Display display = Gdk.x11_get_default_xdisplay(); X.ID xid = Gdk.x11_get_default_root_xwindow(); Gee.List remove_bindings = new Gee.ArrayList(); foreach(var binding in bindings) { if(id == binding.id) { foreach(uint lock_modifier in lock_modifiers) { 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(); } ///////////////////////////////////////////////////////////////////// /// Returns a human readable accelerator for the given ID. ///////////////////////////////////////////////////////////////////// public string get_accelerator_label_of(string id) { foreach (var binding in bindings) { if (binding.id == id) { return binding.trigger.label_with_specials; } } return _("Not bound"); } ///////////////////////////////////////////////////////////////////// /// Returns the accelerator to which the given ID is bound. ///////////////////////////////////////////////////////////////////// public string get_accelerator_of(string id) { foreach (var binding in bindings) { if (binding.id == id) { 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 whether the pie with the given ID opens centered. ///////////////////////////////////////////////////////////////////// public bool get_is_centered(string id) { foreach (var binding in bindings) { if (binding.id == id) { return binding.trigger.centered; } } 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; } } return ""; } ///////////////////////////////////////////////////////////////////// /// Event filter method needed to fetch X.Events. ///////////////////////////////////////////////////////////////////// private Gdk.FilterReturn event_filter(Gdk.XEvent gdk_xevent, Gdk.Event gdk_event) { #if VALA_0_16 || VALA_0_17 X.Event* xevent = (X.Event*) gdk_xevent; #else void* pointer = &gdk_xevent; X.Event* xevent = (X.Event*) pointer; #endif if(xevent->type == X.EventType.KeyPress) { 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.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 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 X.Display display = Gdk.x11_get_default_xdisplay(); // 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; }); } } } } Gnome-Pie-0.5.4/src/utilities/color.vala000066400000000000000000000225101204074113200200570ustar00rootroot00000000000000/* 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 . */ using GLib.Math; namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A Color class with full rgb/hsv support /// and some useful utility methods. ///////////////////////////////////////////////////////////////////////// public class Color: GLib.Object { ///////////////////////////////////////////////////////////////////// /// Private members, storing the actual color information. /// In range 0 .. 1 ///////////////////////////////////////////////////////////////////// private float _r; private float _g; private float _b; private float _a; ///////////////////////////////////////////////////////////////////// /// Creates a white Color. ///////////////////////////////////////////////////////////////////// public Color() { Color.from_rgb(1.0f, 1.0f, 1.0f); } ///////////////////////////////////////////////////////////////////// /// Creates a solid color with the given RGB values. ///////////////////////////////////////////////////////////////////// public Color.from_rgb(float red, float green, float blue) { Color.from_rgba(red, green, blue, 1.0f); } ///////////////////////////////////////////////////////////////////// /// Creates a translucient color with the given RGBA values. ///////////////////////////////////////////////////////////////////// public Color.from_rgba(float red, float green, float blue, float alpha) { r = red; g = green; b = blue; a = alpha; } ///////////////////////////////////////////////////////////////////// /// Creates a color from the given Gdk.Color ///////////////////////////////////////////////////////////////////// public Color.from_gdk(Gdk.Color color) { Color.from_rgb( (float)color.red/65535.0f, (float)color.green/65535.0f, (float)color.blue/65535.0f ); } ///////////////////////////////////////////////////////////////////// /// Creates a color, parsed from a string, such as #22EE33 ///////////////////////////////////////////////////////////////////// public Color.from_string(string hex_string) { Gdk.Color color; Gdk.Color.parse(hex_string, out color); Color.from_gdk(color); } ///////////////////////////////////////////////////////////////////// /// Gets the main color from an Image. Code from Unity. ///////////////////////////////////////////////////////////////////// public Color.from_icon(Image icon) { unowned uchar[] data = icon.surface.get_data(); uint width = icon.surface.get_width(); uint height = icon.surface.get_height(); uint row_bytes = icon.surface.get_stride(); double total = 0.0; double rtotal = 0.0; double gtotal = 0.0; double btotal = 0.0; for (uint i = 0; i < width; ++i) { for (uint j = 0; j < height; ++j) { uint pixel = j * row_bytes + i * 4; double b = data[pixel + 0]/255.0; double g = data[pixel + 1]/255.0; double r = data[pixel + 2]/255.0; double a = data[pixel + 3]/255.0; double saturation = (fmax (r, fmax (g, b)) - fmin (r, fmin (g, b))); double relevance = 0.1 + 0.9 * a * saturation; rtotal += (r * relevance); gtotal += (g * relevance); btotal += (b * relevance); total += relevance; } } Color.from_rgb((float)(rtotal/total), (float)(gtotal/total), (float)(btotal/total)); if (s > 0.15f) s = 0.65f; v = 1.0f; } ///////////////////////////////////////////////////////////////////// /// The reddish part of the color. ///////////////////////////////////////////////////////////////////// public float r { get { return _r; } set { if (value > 1.0f) _r = 1.0f; else if (value < 0.0f) _r = 0.0f; else _r = value; } } ///////////////////////////////////////////////////////////////////// /// The greenish part of the color. ///////////////////////////////////////////////////////////////////// public float g { get { return _g; } set { if (value > 1.0f) _g = 1.0f; else if (value < 0.0f) _g = 0.0f; else _g = value; } } ///////////////////////////////////////////////////////////////////// /// The blueish part of the color. ///////////////////////////////////////////////////////////////////// public float b { get { return _b; } set { if (value > 1.0f) _b = 1.0f; else if (value < 0.0f) _b = 0.0f; else _b = value; } } ///////////////////////////////////////////////////////////////////// /// The transparency of the color. ///////////////////////////////////////////////////////////////////// public float a { get { return _a; } set { if (value > 1.0f) _a = 1.0f; else if (value < 0.0f) _a = 0.0f; else _a = value; } } ///////////////////////////////////////////////////////////////////// /// The hue of the color. ///////////////////////////////////////////////////////////////////// public float h { get { if (s > 0.0f) { float maxi = fmaxf(fmaxf(r, g), b); float mini = fminf(fminf(r, g), b); if (maxi == r) return fmodf(60.0f*((g-b)/(maxi-mini))+360.0f, 360.0f); else if (maxi == g) return fmodf(60.0f*(2.0f + (b-r)/(maxi-mini))+360.0f, 360.0f); else return fmodf(60.0f*(4.0f + (r-g)/(maxi-mini))+360.0f, 360.0f); } else return 0.0f; } set { setHSV(value, s, v); } } ///////////////////////////////////////////////////////////////////// /// The saturation of the color. ///////////////////////////////////////////////////////////////////// public float s { get { if (v == 0.0f) return 0.0f; else return ((v-fminf(fminf(r, g), b)) / v); } set { if (value > 1.0f) setHSV(h, 1.0f, v); else if (value < 0.0f) setHSV(h, 0.0f, v); else setHSV(h, value, v); } } ///////////////////////////////////////////////////////////////////// /// The value of the color. ///////////////////////////////////////////////////////////////////// public float v { get { return fmaxf(fmaxf(r, g), b); } set { if (value > 1) setHSV(h, s, 1.0f); else if (value < 0) setHSV(h, s, 0.0f); else setHSV(h, s, value); } } ///////////////////////////////////////////////////////////////////// /// Inverts the color. ///////////////////////////////////////////////////////////////////// public void invert() { h += 180.0f; v = 1.0f - v; } ///////////////////////////////////////////////////////////////////// /// Private member, used to apply color changes. ///////////////////////////////////////////////////////////////////// private void setHSV(float hue, float saturation, float val) { if(saturation == 0) { r = val; g = val; b = val; return; } hue = fmodf(hue, 360); hue /= 60; int i = (int) floorf(hue); float f = hue - i; switch(i) { case 0: r = val; g = val * (1.0f - saturation * (1.0f - f)); b = val * (1.0f - saturation); break; case 1: r = val * (1.0f - saturation * f); g = val; b = val * (1.0f - saturation); break; case 2: r = val * (1.0f - saturation); g = val; b = val * (1.0f - saturation * (1.0f - f)); break; case 3: r = val * (1.0f - saturation); g = val * (1.0f - saturation * f); b = val; break; case 4: r = val * (1.0f - saturation * (1.0f - f)); g = val * (1.0f - saturation); b = val; break; default: r = val; g = val * (1.0f - saturation); b = val * (1.0f - saturation * f); break; } } } } Gnome-Pie-0.5.4/src/utilities/config.vala000066400000000000000000000167741204074113200202250ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A singleton class for storing global settings. These settings can /// be loaded from and saved to an XML file. ///////////////////////////////////////////////////////////////////////// public class Config : GLib.Object { ///////////////////////////////////////////////////////////////////// /// The singleton instance of this class. ///////////////////////////////////////////////////////////////////// private static Config _instance = null; ///////////////////////////////////////////////////////////////////// /// Returns the singleton instance. ///////////////////////////////////////////////////////////////////// public static Config global { get { if (_instance == null) { _instance = new Config(); _instance.load(); } return _instance; } private set { _instance = value; } } ///////////////////////////////////////////////////////////////////// /// All settings variables. ///////////////////////////////////////////////////////////////////// public Theme theme { get; set; } public double refresh_rate { get; set; default = 60.0; } public double global_scale { get; set; default = 1.0; } public bool show_indicator { get; set; default = true; } public bool show_captions { get; set; default = true; } public bool auto_start { get; set; default = false; } public int showed_news { get; set; default = 0; } public Gee.ArrayList themes { get; private set; } ///////////////////////////////////////////////////////////////////// /// Saves all above variables to a file. ///////////////////////////////////////////////////////////////////// public void save() { var writer = new Xml.TextWriter.filename(Paths.settings); writer.start_document("1.0"); writer.start_element("settings"); writer.write_attribute("theme", theme.name); writer.write_attribute("refresh_rate", refresh_rate.to_string()); writer.write_attribute("global_scale", global_scale.to_string()); writer.write_attribute("show_indicator", show_indicator ? "true" : "false"); writer.write_attribute("show_captions", show_captions ? "true" : "false"); writer.write_attribute("showed_news", showed_news.to_string()); writer.end_element(); writer.end_document(); } ///////////////////////////////////////////////////////////////////// /// Loads all settings variables from a file. ///////////////////////////////////////////////////////////////////// private void load() { // check for auto_start filename this.auto_start = FileUtils.test(Paths.autostart, FileTest.EXISTS); // parse the settings file Xml.Parser.init(); Xml.Doc* settingsXML = Xml.Parser.parse_file(Paths.settings); bool error_occrured = false; string theme_name = ""; if (settingsXML != null) { Xml.Node* root = settingsXML->get_root_element(); if (root != null) { for (Xml.Attr* attribute = root->properties; attribute != null; attribute = attribute->next) { string attr_name = attribute->name.down(); string attr_content = attribute->children->content; switch (attr_name) { case "theme": theme_name = attr_content; break; case "refresh_rate": refresh_rate = double.parse(attr_content); break; case "global_scale": global_scale = double.parse(attr_content); global_scale.clamp(0.5, 2.0); break; case "show_indicator": show_indicator = bool.parse(attr_content); break; case "show_captions": show_captions = bool.parse(attr_content); break; case "showed_news": showed_news = int.parse(attr_content); break; default: warning("Invalid setting \"" + attr_name + "\" in gnome-pie.conf!"); break; } } Xml.Parser.cleanup(); } else { warning("Error loading settings: gnome-pie.conf is empty! Using defaults..."); error_occrured = true; } delete settingsXML; } else { warning("Error loading settings: gnome-pie.conf not found! Using defaults..."); error_occrured = true; } load_themes(theme_name); if (error_occrured) save(); } ///////////////////////////////////////////////////////////////////// /// Registers all themes in the user's and in the global /// theme directory. ///////////////////////////////////////////////////////////////////// public void load_themes(string current) { themes = new Gee.ArrayList(); try { string name; // 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.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.load()) themes.add(theme); } } catch (Error e) { warning (e.message); } if (themes.size > 0) { if (current == "") { current = "Unity"; warning("No theme specified! Using default..."); } foreach (var t in themes) { if (t.name == current) { theme = t; break; } } if (theme == null) { theme = themes[0]; warning("Theme \"" + current + "\" not found! Using fallback..."); } theme.load_images(); } else error("No theme found!"); } } } Gnome-Pie-0.5.4/src/utilities/focusGrabber.vala000066400000000000000000000120571204074113200213520ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// Some helper methods which focus the input on a given Gtk.Window. ///////////////////////////////////////////////////////////////////////// public class FocusGrabber : GLib.Object { ///////////////////////////////////////////////////////////////////// /// Utilities for grabbing focus. /// Code roughly from Gnome-Do/Synapse. ///////////////////////////////////////////////////////////////////// public static void grab(Gdk.Window window, bool keyboard = true, bool pointer = true, bool owner_events = true) { if (keyboard || pointer) { window.raise(); window.focus(Gdk.CURRENT_TIME); if (!try_grab_window(window, keyboard, pointer, owner_events)) { int i = 0; Timeout.add(100, () => { if (++i >= 100) return false; return !try_grab_window(window, keyboard, pointer, owner_events); }); } } } ///////////////////////////////////////////////////////////////////// /// Code roughly from Gnome-Do/Synapse. ///////////////////////////////////////////////////////////////////// public static void ungrab(bool keyboard = true, bool pointer = true) { #if HAVE_GTK_3 var display = Gdk.Display.get_default(); var manager = display.get_device_manager(); #if VALA_0_16 || VALA_0_17 GLib.List list = manager.list_devices(Gdk.DeviceType.MASTER); #else unowned GLib.List list = manager.list_devices(Gdk.DeviceType.MASTER); #endif foreach(var device in list) { if ((device.input_source == Gdk.InputSource.KEYBOARD && keyboard) || (device.input_source != Gdk.InputSource.KEYBOARD && pointer)) device.ungrab(Gdk.CURRENT_TIME); } #else if (pointer) Gdk.pointer_ungrab(Gdk.CURRENT_TIME); if (keyboard) Gdk.keyboard_ungrab(Gdk.CURRENT_TIME); #endif } ///////////////////////////////////////////////////////////////////// /// Code roughly from Gnome-Do/Synapse. ///////////////////////////////////////////////////////////////////// private static bool try_grab_window(Gdk.Window window, bool keyboard, bool pointer, bool owner_events) { #if HAVE_GTK_3 var display = Gdk.Display.get_default(); var manager = display.get_device_manager(); bool grabbed_all = true; #if VALA_0_16 GLib.List list = manager.list_devices(Gdk.DeviceType.MASTER); #else unowned GLib.List list = manager.list_devices(Gdk.DeviceType.MASTER); #endif foreach(var device in list) { if ((device.input_source == Gdk.InputSource.KEYBOARD && keyboard) || (device.input_source != Gdk.InputSource.KEYBOARD && pointer)) { var status = device.grab(window, Gdk.GrabOwnership.APPLICATION, owner_events, Gdk.EventMask.ALL_EVENTS_MASK, null, Gdk.CURRENT_TIME); if (status != Gdk.GrabStatus.SUCCESS) grabbed_all = false; } } if (grabbed_all) return true; ungrab(keyboard, pointer); #else if (!pointer || Gdk.pointer_grab(window, owner_events, Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK | Gdk.EventMask.POINTER_MOTION_MASK, null, null, Gdk.CURRENT_TIME) == Gdk.GrabStatus.SUCCESS) { if (!keyboard || Gdk.keyboard_grab(window, owner_events, Gdk.CURRENT_TIME) == Gdk.GrabStatus.SUCCESS) { return true; } else if (pointer) { ungrab(false, true); return false; } } #endif return false; } } } Gnome-Pie-0.5.4/src/utilities/key.vala000066400000000000000000000142471204074113200175410ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A class which represents a key stroke. It can be used to "press" /// the associated keys. ///////////////////////////////////////////////////////////////////////// public class Key : GLib.Object { ///////////////////////////////////////////////////////////////////// /// Some static members, which are often used by this class. ///////////////////////////////////////////////////////////////////// private static X.Display display; private static int shift_code; private static int ctrl_code; private static int alt_code; private static int super_code; ///////////////////////////////////////////////////////////////////// /// A human readable form of the Key's accelerator. ///////////////////////////////////////////////////////////////////// public string label { get; private set; } ///////////////////////////////////////////////////////////////////// /// The accelerator of the Key. ///////////////////////////////////////////////////////////////////// public string accelerator { get; private set; } ///////////////////////////////////////////////////////////////////// /// Keycode and modifiers of this stroke. ///////////////////////////////////////////////////////////////////// private int key_code; private Gdk.ModifierType modifiers; ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all members to defaults. ///////////////////////////////////////////////////////////////////// public Key() { this.accelerator = ""; this.modifiers = 0; this.key_code = 0; this.label = _("Not bound"); } ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all members. ///////////////////////////////////////////////////////////////////// public Key.from_string(string stroke) { this.accelerator = stroke; uint keysym; Gtk.accelerator_parse(stroke, out keysym, out this.modifiers); this.key_code = display.keysym_to_keycode(keysym); this.label = Gtk.accelerator_get_label(keysym, this.modifiers); } ///////////////////////////////////////////////////////////////////// /// C'tor, initializes all members. ///////////////////////////////////////////////////////////////////// public Key.from_values(uint keysym, Gdk.ModifierType modifiers) { this.accelerator = Gtk.accelerator_name(keysym, modifiers); this.label = Gtk.accelerator_get_label(keysym, modifiers); this.key_code = display.keysym_to_keycode(keysym); this.modifiers = modifiers; } ///////////////////////////////////////////////////////////////////// /// Initializes static members. ///////////////////////////////////////////////////////////////////// static construct { display = new X.Display(); shift_code = display.keysym_to_keycode(Gdk.keyval_from_name("Shift_L")); ctrl_code = display.keysym_to_keycode(Gdk.keyval_from_name("Control_L")); alt_code = display.keysym_to_keycode(Gdk.keyval_from_name("Alt_L")); super_code = display.keysym_to_keycode(Gdk.keyval_from_name("Super_L")); } ///////////////////////////////////////////////////////////////////// /// Simulates the pressing of the Key . ///////////////////////////////////////////////////////////////////// public void press() { // store currently pressed modifier keys Gdk.ModifierType current_modifiers = get_modifiers(); // release them and press the desired ones press_modifiers(current_modifiers, false); press_modifiers(this.modifiers, true); // send events to X display.flush(); // press and release the actual key X.Test.fake_key_event(this.display, this.key_code, true, 0); X.Test.fake_key_event(this.display, this.key_code, false, 0); // release the pressed modifiers and re-press the keys hold down by the user press_modifiers(this.modifiers, false); press_modifiers(current_modifiers, true); // send events to X display.flush(); } ///////////////////////////////////////////////////////////////////// /// Helper method returning currently hold down modifier keys. ///////////////////////////////////////////////////////////////////// private Gdk.ModifierType get_modifiers() { Gdk.ModifierType modifiers; Gtk.get_current_event_state(out modifiers); return modifiers; } ///////////////////////////////////////////////////////////////////// /// Helper method which 'presses' the desired modifier keys. ///////////////////////////////////////////////////////////////////// private void press_modifiers(Gdk.ModifierType modifiers, bool down) { if ((modifiers & Gdk.ModifierType.CONTROL_MASK) > 0) X.Test.fake_key_event(this.display, this.ctrl_code, down, 0); if ((modifiers & Gdk.ModifierType.SHIFT_MASK) > 0) X.Test.fake_key_event(this.display, this.shift_code, down, 0); if ((modifiers & Gdk.ModifierType.MOD1_MASK) > 0) X.Test.fake_key_event(this.display, this.alt_code, down, 0); if ((modifiers & Gdk.ModifierType.SUPER_MASK) > 0) X.Test.fake_key_event(this.display, this.super_code, down, 0); } } } Gnome-Pie-0.5.4/src/utilities/logger.vala000066400000000000000000000243331204074113200202250ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A static class which beautifies the messages of the default logger. /// Some of this code is inspired by plank's written by Robert Dyer. /// Thanks a lot for this project! ///////////////////////////////////////////////////////////////////////// public class Logger { ///////////////////////////////////////////////////////////////////// /// If these are set to false, the according messages are not shown ///////////////////////////////////////////////////////////////////// private static const bool display_debug = true; private static const bool display_warning = true; private static const bool display_error = true; private static const bool display_message = true; ///////////////////////////////////////////////////////////////////// /// If these are set to false, the according messages are not logged ///////////////////////////////////////////////////////////////////// private static const bool log_debug = false; private static const bool log_warning = true; private static const bool log_error = true; private static const bool log_message = true; ///////////////////////////////////////////////////////////////////// /// If true, a time stamp is shown in each message. ///////////////////////////////////////////////////////////////////// private static const bool display_time = false; private static const bool log_time = true; ///////////////////////////////////////////////////////////////////// /// If true, the origin of the message is shown. In form file:line ///////////////////////////////////////////////////////////////////// private static const bool display_file = false; private static const bool log_file = false; ///////////////////////////////////////////////////////////////////// /// A regex, used to format the standard message. ///////////////////////////////////////////////////////////////////// private static Regex regex = null; ///////////////////////////////////////////////////////////////////// /// Limit log and statistics size to roughly 1 MB. ///////////////////////////////////////////////////////////////////// private static const int max_log_length = 1000000; private static int log_length; ///////////////////////////////////////////////////////////////////// /// Possible terminal colors. ///////////////////////////////////////////////////////////////////// private enum Color { BLACK, RED, GREEN, YELLOW, BLUE, PURPLE, TURQUOISE, WHITE } ///////////////////////////////////////////////////////////////////// /// Creates the regex and binds the handler. ///////////////////////////////////////////////////////////////////// public static void init() { log_length = -1; try { regex = new Regex("""(.*)\.vala(:\d+): (.*)"""); } catch {} GLib.Log.set_handler(null, GLib.LogLevelFlags.LEVEL_MASK, log_func); } ///////////////////////////////////////////////////////////////////// /// Appends a line to the log file ///////////////////////////////////////////////////////////////////// private static void write_log_line(string line) { var log = GLib.FileStream.open(Paths.log, "a"); if (log != null) { if (log_length == -1) log_length = (int)log.tell(); log.puts(line); log_length += line.length; } if (log_length > max_log_length) { string content = ""; try { GLib.FileUtils.get_contents(Paths.log, out content); int split_index = content.index_of_char('\n', log_length - (int)(max_log_length*0.9)); GLib.FileUtils.set_contents(Paths.log, content.substring(split_index+1)); log_length -= (split_index+1); } catch (GLib.FileError e) {} } } ///////////////////////////////////////////////////////////////////// /// Displays a message. ///////////////////////////////////////////////////////////////////// private static void message(string message, string message_log) { if (display_message) { stdout.printf(set_color(Color.GREEN, false) + "[" + (display_time ? get_time() + " " : "") + "MESSAGE]" + message); } if (log_message) { write_log_line("[" + (log_time ? get_time() + " " : "") + "MESSAGE]" + message_log); } } ///////////////////////////////////////////////////////////////////// /// Displays a Debug message. ///////////////////////////////////////////////////////////////////// private static void debug(string message, string message_log) { if (display_debug) { stdout.printf(set_color(Color.BLUE, false) + "[" + (display_time ? get_time() + " " : "") + " DEBUG ]" + message); } if (log_debug) { write_log_line("[" + (log_time ? get_time() + " " : "") + " DEBUG ]" + message_log); } } ///////////////////////////////////////////////////////////////////// /// Displays a Warning message. ///////////////////////////////////////////////////////////////////// private static void warning(string message, string message_log) { if (display_warning) { stdout.printf(set_color(Color.YELLOW, false) + "[" + (display_time ? get_time() + " " : "") + "WARNING]" + message); } if (log_warning) { write_log_line("[" + (log_time ? get_time() + " " : "") + "WARNING]" + message_log); } } ///////////////////////////////////////////////////////////////////// /// Displays a Error message. ///////////////////////////////////////////////////////////////////// private static void error(string message, string message_log) { if (display_error) { stdout.printf(set_color(Color.RED, false) + "[" + (display_time ? get_time() + " " : "") + " ERROR ]" + message); } if (log_error) { write_log_line("[" + (log_time ? get_time() + " " : "") + " ERROR ]" + message_log); } } ///////////////////////////////////////////////////////////////////// /// Helper method which resets the terminal color. ///////////////////////////////////////////////////////////////////// private static string reset_color() { return "\x001b[0m"; } ///////////////////////////////////////////////////////////////////// /// Helper method which sets the terminal color. ///////////////////////////////////////////////////////////////////// private static string set_color(Color color, bool bold) { if (bold) return "\x001b[1;%dm".printf((int)color + 30); else return "\x001b[0;%dm".printf((int)color + 30); } ///////////////////////////////////////////////////////////////////// /// Returns the current time in hh:mm:ss:mmmmmm ///////////////////////////////////////////////////////////////////// private static string get_time() { var now = new DateTime.now_local(); return "%.4d:%.2d:%.2d:%.2d:%.2d:%.2d:%.6d".printf(now.get_year(), now.get_month(), now.get_day_of_month(), now.get_hour(), now.get_minute(), now.get_second(), now.get_microsecond()); } ///////////////////////////////////////////////////////////////////// /// Helper method to format the message. ///////////////////////////////////////////////////////////////////// private static string create_message(string message) { if (display_file && regex != null && regex.match(message)) { var parts = regex.split(message); return " [%s%s]%s %s\n".printf(parts[1], parts[2], reset_color(), parts[3]); } else if (regex != null && regex.match(message)) { var parts = regex.split(message); return "%s %s\n".printf(reset_color(), parts[3]); } else { return reset_color() + " " + message + "\n"; } } ///////////////////////////////////////////////////////////////////// /// Helper method to format the message for logging. ///////////////////////////////////////////////////////////////////// private static string create_log_message(string message) { if (log_file && regex != null && regex.match(message)) { var parts = regex.split(message); return " [%s%s] %s\n".printf(parts[1], parts[2], parts[3]); } else if (regex != null && regex.match(message)) { var parts = regex.split(message); return " %s\n".printf(parts[3]); } else { return " " + message + "\n"; } } ///////////////////////////////////////////////////////////////////// /// The handler function. ///////////////////////////////////////////////////////////////////// private static void log_func(string? d, LogLevelFlags flags, string text) { switch (flags) { case LogLevelFlags.LEVEL_ERROR: case LogLevelFlags.LEVEL_CRITICAL: error(create_message(text), create_log_message(text)); break; case LogLevelFlags.LEVEL_INFO: case LogLevelFlags.LEVEL_MESSAGE: message(create_message(text), create_log_message(text)); break; case LogLevelFlags.LEVEL_DEBUG: debug(create_message(text), create_log_message(text)); break; case LogLevelFlags.LEVEL_WARNING: default: warning(create_message(text), create_log_message(text)); break; } } } } Gnome-Pie-0.5.4/src/utilities/paths.vala000066400000000000000000000255321204074113200200670ustar00rootroot00000000000000/* 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 . */ namespace GnomePie { ///////////////////////////////////////////////////////////////////////// /// A static class which stores all relevant paths used by Gnome-Pie. /// These depend upon the location from which the program was launched. ///////////////////////////////////////////////////////////////////////// public class Paths : GLib.Object { ///////////////////////////////////////////////////////////////////// /// The config directory, /// usually ~/.config/gnome-pie/. ///////////////////////////////////////////////////////////////////// public static string config_directory { get; private set; default=""; } ///////////////////////////////////////////////////////////////////// /// The log file, /// usually ~/.config/gnome-pie/gnome-pie.log. ///////////////////////////////////////////////////////////////////// public static string log { get; private set; default=""; } ///////////////////////////////////////////////////////////////////// /// The statistics file, /// usually ~/.config/gnome-pie/gnome-pie.stats. ///////////////////////////////////////////////////////////////////// public static string stats { get; private set; default=""; } ///////////////////////////////////////////////////////////////////// /// The settings file, /// usually ~/.config/gnome-pie/gnome-pie.conf. ///////////////////////////////////////////////////////////////////// public static string settings { get; private set; default=""; } ///////////////////////////////////////////////////////////////////// /// The pie configuration file /// usually ~/.config/gnome-pie/pies.conf. ///////////////////////////////////////////////////////////////////// public static string pie_config { get; private set; default=""; } ///////////////////////////////////////////////////////////////////// /// The directory containing themes installed by the user /// usually ~/.config/gnome-pie/themes. ///////////////////////////////////////////////////////////////////// public static string local_themes { get; private set; default=""; } ///////////////////////////////////////////////////////////////////// /// The directory containing pre-installed themes /// usually /usr/share/gnome-pie/themes. ///////////////////////////////////////////////////////////////////// public static string global_themes { get; private set; default=""; } ///////////////////////////////////////////////////////////////////// /// The directory containing locale files /// usually /usr/share/locale. ///////////////////////////////////////////////////////////////////// public static string locales { get; private set; default=""; } ///////////////////////////////////////////////////////////////////// /// The directory containing UI declaration files /// usually /usr/share/gnome-pie/ui/. ///////////////////////////////////////////////////////////////////// public static string ui_files { get; private set; default=""; } ///////////////////////////////////////////////////////////////////// /// The autostart file of gnome-pie_config /// usually ~/.config/autostart/gnome-pie.desktop. ///////////////////////////////////////////////////////////////////// public static string autostart { get; private set; default=""; } ///////////////////////////////////////////////////////////////////// /// The path where all pie-launchers are stored /// usually ~/.config/gnome-pie/launchers. ///////////////////////////////////////////////////////////////////// public static string launchers { get; private set; default=""; } ///////////////////////////////////////////////////////////////////// /// The path to the executable. ///////////////////////////////////////////////////////////////////// public static string executable { get; private set; default=""; } ///////////////////////////////////////////////////////////////////// /// Initializes all values above. ///////////////////////////////////////////////////////////////////// public static void init() { // get path of executable try { executable = GLib.File.new_for_path(GLib.FileUtils.read_link("/proc/self/exe")).get_path(); } catch (GLib.FileError e) { warning("Failed to get path of executable!"); } // append resources to icon search path to icon theme, if neccasary var icon_dir = GLib.File.new_for_path(GLib.Path.get_dirname(executable)).get_child("resources"); if (icon_dir.query_exists()) { string path = icon_dir.get_path(); Gtk.IconTheme.get_default().append_search_path(path); } Gtk.IconTheme.get_default().append_search_path("/usr/share/pixmaps/"); // get global paths var default_dir = GLib.File.new_for_path("/usr/share/gnome-pie/"); if(!default_dir.query_exists()) { default_dir = GLib.File.new_for_path("/usr/local/share/gnome-pie/"); if(!default_dir.query_exists()) { default_dir = GLib.File.new_for_path(GLib.Path.get_dirname( executable)).get_child("resources"); } } global_themes = default_dir.get_path() + "/themes"; ui_files = default_dir.get_path() + "/ui"; // get locales path var locale_dir = GLib.File.new_for_path("/usr/share/locale/de/LC_MESSAGES/gnomepie.mo"); if(locale_dir.query_exists()) { locale_dir = GLib.File.new_for_path("/usr/share/locale"); } else { locale_dir = GLib.File.new_for_path("/usr/local/share/locale/de/LC_MESSAGES/gnomepie.mo"); if(locale_dir.query_exists()) { locale_dir = GLib.File.new_for_path("/usr/local/share/locale"); } else { locale_dir = GLib.File.new_for_path(GLib.Path.get_dirname( executable)).get_child("resources/locale/de/LC_MESSAGES/gnomepie.mo"); if(locale_dir.query_exists()) { locale_dir = GLib.File.new_for_path(GLib.Path.get_dirname( executable)).get_child("resources/locale"); } } } locales = locale_dir.get_path(); // get local paths var config_dir = GLib.File.new_for_path( GLib.Environment.get_user_config_dir()).get_child("gnome-pie"); // create config_dir if neccasary if(!config_dir.query_exists()) { try { config_dir.make_directory(); } catch (GLib.Error e) { error(e.message); } } config_directory = config_dir.get_path(); // create local themes directory if neccasary var themes_dir = config_dir.get_child("themes"); if(!themes_dir.query_exists()) { try { themes_dir.make_directory(); } catch (GLib.Error e) { error(e.message); } } local_themes = themes_dir.get_path(); // create launchers directory if neccasary var launchers_dir = config_dir.get_child("launchers"); if(!launchers_dir.query_exists()) { try { launchers_dir.make_directory(); } catch (GLib.Error e) { error(e.message); } } launchers = launchers_dir.get_path(); // check for config file var config_file = config_dir.get_child("pies.conf"); pie_config = config_file.get_path(); settings = config_dir.get_path() + "/gnome-pie.conf"; log = config_dir.get_path() + "/gnome-pie.log"; stats = config_dir.get_path() + "/gnome-pie.stats"; if (!GLib.File.new_for_path(log).query_exists()) { try { FileUtils.set_contents(log, ""); } catch (GLib.FileError e) { error(e.message); } } if (!GLib.File.new_for_path(stats).query_exists()) { try { FileUtils.set_contents(stats, ""); } catch (GLib.FileError e) { error(e.message); } } // autostart file name autostart = GLib.Path.build_filename(GLib.Environment.get_user_config_dir(), "autostart", "gnome-pie.desktop", null); // print results if (!GLib.File.new_for_path(pie_config).query_exists()) warning("Failed to find pie configuration file \"pies.conf\"! (This should only happen when Gnome-Pie is started for the first time...)"); if (!GLib.File.new_for_path(settings).query_exists()) warning("Failed to find settings file \"gnome-pie.conf\"! (This should only happen when Gnome-Pie is started for the first time...)"); if (!GLib.File.new_for_path(log).query_exists()) warning("Failed to find log file \"gnome-pie.log\"!"); if (!GLib.File.new_for_path(stats).query_exists()) warning("Failed to find statistics file \"gnome-pie.stats\"!"); if (!GLib.File.new_for_path(local_themes).query_exists()) warning("Failed to find local themes directory!"); if (!GLib.File.new_for_path(launchers).query_exists()) warning("Failed to find launchers directory!"); if (!GLib.File.new_for_path(global_themes).query_exists()) warning("Failed to find global themes directory!"); if (!GLib.File.new_for_path(ui_files).query_exists()) warning("Failed to find UI files directory!"); } } } Gnome-Pie-0.5.4/src/utilities/trigger.vala000066400000000000000000000271501204074113200204110ustar00rootroot00000000000000/* 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 . */ 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]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; } ///////////////////////////////////////////////////////////////////// /// True if the pie opens in the middle of the screen. ///////////////////////////////////////////////////////////////////// public bool centered { 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)]button" where /// "" is something like "" or "", "button" /// something like "s", "F4" or "button0" and "[option]" is either /// "[turbo]", "[centered]" 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, bool centered ) { string trigger = (turbo ? "[turbo]" : "") + (delayed ? "[delayed]" : "") + (centered ? "[centered]" : ""); 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)]button" where /// "" is something like "" or "", "button" /// something like "s", "F4" or "button0" and "[option]" is either /// "[turbo]", "[centered]" 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]"); this.centered = check_string.contains("[centered]"); // remove optional arguments check_string = check_string.replace("[turbo]", ""); check_string = check_string.replace("[delayed]", ""); check_string = check_string.replace("[centered]", ""); 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_with_specials = GLib.Markup.escape_text(this.label); if (this.turbo && this.delayed && this.centered) this.label_with_specials += (" [ " + _("Turbo") + " | " + _("Delayed") + " | " + _("Centered") + " ]"); else if (this.turbo && this.centered) this.label_with_specials += (" [ " + _("Turbo") + " | " + _("Centered") + " ]"); else if (this.turbo && this.delayed) this.label_with_specials += (" [ " + _("Turbo") + " | " + _("Delayed") + " ]"); else if (this.centered && this.delayed) this.label_with_specials += (" [ " + _("Delayed") + " | " + _("Centered") + " ]"); else if (this.turbo) this.label_with_specials += (" [ " + _("Turbo") + " ]"); else if (this.delayed) this.label_with_specials += (" [ " + _("Delayed") + " ]"); else if (this.centered) this.label_with_specials += (" [ " + _("Centered") + " ]"); } 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]", ""); check_string = check_string.replace("[centered]", ""); 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; } } } Gnome-Pie-0.5.4/vapi/000077500000000000000000000000001204074113200142315ustar00rootroot00000000000000Gnome-Pie-0.5.4/vapi/appindicator-0.1.vapi000066400000000000000000000105451204074113200200700ustar00rootroot00000000000000/* appindicator-0.1.vapi generated by vapigen, do not modify. */ [CCode (cprefix = "App", lower_case_cprefix = "app_", gir_namespace = "AppIndicator", gir_version = "0.1")] namespace AppIndicator { [CCode (cheader_filename = "libappindicator/app-indicator.h")] public class Indicator : GLib.Object { public AppIndicator.IndicatorPrivate priv; [CCode (has_construct_function = false)] public Indicator (string id, string icon_name, AppIndicator.IndicatorCategory category); public void build_menu_from_desktop (string desktop_file, string desktop_profile); public unowned string get_attention_icon (); public unowned string get_attention_icon_desc (); public AppIndicator.IndicatorCategory get_category (); public unowned string get_icon (); public unowned string get_icon_desc (); public unowned string get_icon_theme_path (); public unowned string get_id (); public unowned string get_label (); public unowned string get_label_guide (); public unowned Gtk.Menu get_menu (); public uint32 get_ordering_index (); public unowned Gtk.Widget get_secondary_activate_target (); public AppIndicator.IndicatorStatus get_status (); public void set_attention_icon (string icon_name); public void set_attention_icon_full (string icon_name, string icon_desc); public void set_icon (string icon_name); public void set_icon_full (string icon_name, string icon_desc); public void set_icon_theme_path (string icon_theme_path); public void set_label (string label, string guide); public void set_menu (Gtk.Menu? menu); public void set_ordering_index (uint32 ordering_index); public void set_secondary_activate_target (Gtk.Widget? menuitem); public void set_status (AppIndicator.IndicatorStatus status); [NoWrapper] public virtual void unfallback (Gtk.StatusIcon status_icon); [CCode (has_construct_function = false)] public Indicator.with_path (string id, string icon_name, AppIndicator.IndicatorCategory category, string icon_theme_path); public string attention_icon_desc { get; set; } [NoAccessorMethod] public string attention_icon_name { get; set; } public string category { get; construct; } [NoAccessorMethod] public bool connected { get; } public string icon_desc { get; set; } [NoAccessorMethod] public string icon_name { get; set; } public string icon_theme_path { get; set construct; } public string id { get; construct; } public string label { get; set; } public string label_guide { get; set; } public uint ordering_index { get; set; } public string status { get; set; } public virtual signal void connection_changed (bool indicator); public virtual signal void new_attention_icon (); public virtual signal void new_icon (); public virtual signal void new_icon_theme_path (string indicator); public virtual signal void new_label (string indicator, string label); public virtual signal void new_status (string indicator); public virtual signal void scroll_event (int indicator, uint delta); } [CCode (type_id = "APP_TYPE_INDICATOR_PRIVATE", cheader_filename = "libappindicator/app-indicator.h")] public struct IndicatorPrivate { } [CCode (cprefix = "APP_INDICATOR_CATEGORY_", cheader_filename = "libappindicator/app-indicator.h")] public enum IndicatorCategory { APPLICATION_STATUS, COMMUNICATIONS, SYSTEM_SERVICES, HARDWARE, OTHER } [CCode (cprefix = "APP_INDICATOR_STATUS_", cheader_filename = "libappindicator/app-indicator.h")] public enum IndicatorStatus { PASSIVE, ACTIVE, ATTENTION } [CCode (cheader_filename = "libappindicator/app-indicator.h")] public const string INDICATOR_SHORTY_NICK; [CCode (cheader_filename = "libappindicator/app-indicator.h")] public const string INDICATOR_SIGNAL_CONNECTION_CHANGED; [CCode (cheader_filename = "libappindicator/app-indicator.h")] public const string INDICATOR_SIGNAL_NEW_ATTENTION_ICON; [CCode (cheader_filename = "libappindicator/app-indicator.h")] public const string INDICATOR_SIGNAL_NEW_ICON; [CCode (cheader_filename = "libappindicator/app-indicator.h")] public const string INDICATOR_SIGNAL_NEW_ICON_THEME_PATH; [CCode (cheader_filename = "libappindicator/app-indicator.h")] public const string INDICATOR_SIGNAL_NEW_LABEL; [CCode (cheader_filename = "libappindicator/app-indicator.h")] public const string INDICATOR_SIGNAL_NEW_STATUS; [CCode (cheader_filename = "libappindicator/app-indicator.h")] public const string INDICATOR_SIGNAL_SCROLL_EVENT; } Gnome-Pie-0.5.4/vapi/bamf.vapi000066400000000000000000000122251204074113200160210ustar00rootroot00000000000000/* 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 } } Gnome-Pie-0.5.4/vapi/gee-1.0.vapi000066400000000000000000000437031204074113200161550ustar00rootroot00000000000000/* gee-1.0.vapi generated by valac-0.12 0.12.1, do not modify. */ [CCode (cprefix = "Gee", lower_case_cprefix = "gee_", gir_namespace = "Gee", gir_version = "1.0")] namespace Gee { [CCode (cprefix = "GeeFunctions", lower_case_cprefix = "gee_functions_")] namespace Functions { [CCode (cheader_filename = "gee.h")] public static GLib.CompareFunc get_compare_func_for (GLib.Type t); [CCode (cheader_filename = "gee.h")] public static GLib.EqualFunc get_equal_func_for (GLib.Type t); [CCode (cheader_filename = "gee.h")] public static GLib.HashFunc get_hash_func_for (GLib.Type t); } [CCode (cheader_filename = "gee.h")] public abstract class AbstractCollection : GLib.Object, Gee.Iterable, Gee.Collection { public AbstractCollection (); public abstract bool add (G item); public virtual bool add_all (Gee.Collection collection); public abstract void clear (); public abstract bool contains (G item); public virtual bool contains_all (Gee.Collection collection); public abstract Gee.Iterator iterator (); public abstract bool remove (G item); public virtual bool remove_all (Gee.Collection collection); public virtual bool retain_all (Gee.Collection collection); public virtual G[] to_array (); public virtual bool is_empty { get; } public virtual Gee.Collection read_only_view { owned get; } public abstract int size { get; } } [CCode (cheader_filename = "gee.h")] public abstract class AbstractList : Gee.AbstractCollection, Gee.List { public AbstractList (); public virtual G first (); public abstract new G @get (int index); public abstract int index_of (G item); public abstract void insert (int index, G item); public virtual void insert_all (int index, Gee.Collection collection); public virtual G last (); public abstract Gee.ListIterator list_iterator (); public abstract G remove_at (int index); public abstract new void @set (int index, G item); public abstract Gee.List? slice (int start, int stop); public virtual Gee.List read_only_view { owned get; } } [CCode (cheader_filename = "gee.h")] public abstract class AbstractMap : GLib.Object, Gee.Iterable>, Gee.Map { public AbstractMap (); public abstract void clear (); public abstract new V @get (K key); public abstract bool has (K key, V value); public virtual bool has_all (Gee.Map map); public abstract bool has_key (K key); public abstract Gee.MapIterator map_iterator (); public abstract new void @set (K key, V value); public virtual void set_all (Gee.Map map); public abstract bool unset (K key, out V value = null); public virtual bool unset_all (Gee.Map map); public abstract Gee.Set> entries { owned get; } public virtual bool is_empty { get; } public abstract Gee.Set keys { owned get; } public virtual Gee.Map read_only_view { owned get; } public abstract int size { get; } public abstract Gee.Collection values { owned get; } } [CCode (cheader_filename = "gee.h")] public abstract class AbstractMultiMap : GLib.Object, Gee.MultiMap { protected Gee.Map> _storage_map; public AbstractMultiMap (Gee.Map> storage_map); protected abstract Gee.MultiSet create_multi_key_set (); protected abstract Gee.Collection create_value_storage (); protected abstract GLib.EqualFunc get_value_equal_func (); } [CCode (cheader_filename = "gee.h")] public abstract class AbstractMultiSet : Gee.AbstractCollection, Gee.MultiSet { protected Gee.Map _storage_map; public AbstractMultiSet (Gee.Map storage_map); public override bool add (G item); public override void clear (); public override bool contains (G item); public override Gee.Iterator iterator (); public override bool remove (G item); public override int size { get; } } [CCode (cheader_filename = "gee.h")] public abstract class AbstractQueue : Gee.AbstractCollection, Gee.Queue { public AbstractQueue (); public abstract int drain (Gee.Collection recipient, int amount = -1); public abstract bool offer (G element); public abstract G peek (); public abstract G poll (); public abstract int capacity { get; } public abstract bool is_full { get; } public abstract int remaining_capacity { get; } } [CCode (cheader_filename = "gee.h")] public abstract class AbstractSet : Gee.AbstractCollection, Gee.Set { public AbstractSet (); public virtual Gee.Set read_only_view { owned get; } } [CCode (cheader_filename = "gee.h")] public class ArrayList : Gee.AbstractList { public ArrayList (GLib.EqualFunc? equal_func = null); public override bool add (G item); public override bool add_all (Gee.Collection collection); public override void clear (); public override bool contains (G item); public override G @get (int index); public override int index_of (G item); public override void insert (int index, G item); public override Gee.Iterator iterator (); public override Gee.ListIterator list_iterator (); public override bool remove (G item); public override G remove_at (int index); public override void @set (int index, G item); public override Gee.List? slice (int start, int stop); public void sort_with_data (GLib.CompareDataFunc compare); public GLib.EqualFunc equal_func { get; private set; } public override int size { get; } } [CCode (cheader_filename = "gee.h")] public class HashMap : Gee.AbstractMap { public HashMap (GLib.HashFunc? key_hash_func = null, GLib.EqualFunc? key_equal_func = null, GLib.EqualFunc? value_equal_func = null); public override void clear (); public override V @get (K key); public override bool has (K key, V value); public override bool has_key (K key); public override Gee.MapIterator map_iterator (); public override void @set (K key, V value); public override bool unset (K key, out V value = null); public override Gee.Set> entries { owned get; } public GLib.EqualFunc key_equal_func { get; private set; } public GLib.HashFunc key_hash_func { get; private set; } public override Gee.Set keys { owned get; } public override int size { get; } public GLib.EqualFunc value_equal_func { get; private set; } public override Gee.Collection values { owned get; } } [CCode (cheader_filename = "gee.h")] public class HashMultiMap : Gee.AbstractMultiMap { public HashMultiMap (GLib.HashFunc? key_hash_func = null, GLib.EqualFunc? key_equal_func = null, GLib.HashFunc? value_hash_func = null, GLib.EqualFunc? value_equal_func = null); protected override Gee.MultiSet create_multi_key_set (); protected override Gee.Collection create_value_storage (); protected override GLib.EqualFunc get_value_equal_func (); public GLib.EqualFunc key_equal_func { get; } public GLib.HashFunc key_hash_func { get; } public GLib.EqualFunc value_equal_func { get; private set; } public GLib.HashFunc value_hash_func { get; private set; } } [CCode (cheader_filename = "gee.h")] public class HashMultiSet : Gee.AbstractMultiSet { public HashMultiSet (GLib.HashFunc? hash_func = null, GLib.EqualFunc? equal_func = null); public GLib.EqualFunc equal_func { get; } public GLib.HashFunc hash_func { get; } } [CCode (cheader_filename = "gee.h")] public class HashSet : Gee.AbstractSet { public HashSet (GLib.HashFunc? hash_func = null, GLib.EqualFunc? equal_func = null); public override bool add (G key); public override void clear (); public override bool contains (G key); public override Gee.Iterator iterator (); public override bool remove (G key); public GLib.EqualFunc equal_func { get; private set; } public GLib.HashFunc hash_func { get; private set; } public override int size { get; } } [CCode (cheader_filename = "gee.h")] public class LinkedList : Gee.AbstractList, Gee.Queue, Gee.Deque { public LinkedList (GLib.EqualFunc? equal_func = null); public override bool add (G item); public override void clear (); public override bool contains (G item); public override G first (); public override G @get (int index); public override int index_of (G item); public override void insert (int index, G item); public override Gee.Iterator iterator (); public override G last (); public override Gee.ListIterator list_iterator (); public override bool remove (G item); public override G remove_at (int index); public override void @set (int index, G item); public override Gee.List? slice (int start, int stop); public GLib.EqualFunc equal_func { get; private set; } public override int size { get; } } [CCode (cheader_filename = "gee.h")] public class PriorityQueue : Gee.AbstractQueue { public PriorityQueue (GLib.CompareFunc? compare_func = null); public override bool add (G item); public override void clear (); public override bool contains (G item); public override int drain (Gee.Collection recipient, int amount = -1); public override Gee.Iterator iterator (); public override bool offer (G element); public override G peek (); public override G poll (); public override bool remove (G item); public override int capacity { get; } public GLib.CompareFunc compare_func { get; private set; } public override bool is_full { get; } public override int remaining_capacity { get; } public override int size { get; } } [CCode (cheader_filename = "gee.h")] public class TreeMap : Gee.AbstractMap { public TreeMap (GLib.CompareFunc? key_compare_func = null, GLib.EqualFunc? value_equal_func = null); public override void clear (); public override V @get (K key); public override bool has (K key, V value); public override bool has_key (K key); public override Gee.MapIterator map_iterator (); public override void @set (K key, V value); public override bool unset (K key, out V value = null); public override Gee.Set> entries { owned get; } public GLib.CompareFunc key_compare_func { get; private set; } public override Gee.Set keys { owned get; } public override int size { get; } public GLib.EqualFunc value_equal_func { get; private set; } public override Gee.Collection values { owned get; } } [CCode (cheader_filename = "gee.h")] public class TreeMultiMap : Gee.AbstractMultiMap { public TreeMultiMap (GLib.CompareFunc? key_compare_func = null, GLib.CompareFunc? value_compare_func = null); protected override Gee.MultiSet create_multi_key_set (); protected override Gee.Collection create_value_storage (); protected override GLib.EqualFunc get_value_equal_func (); public GLib.CompareFunc key_compare_func { get; } public GLib.CompareFunc value_compare_func { get; private set; } } [CCode (cheader_filename = "gee.h")] public class TreeMultiSet : Gee.AbstractMultiSet { public TreeMultiSet (GLib.CompareFunc? compare_func = null); public GLib.CompareFunc compare_func { get; } } [CCode (cheader_filename = "gee.h")] public class TreeSet : Gee.AbstractSet, Gee.SortedSet { public TreeSet (GLib.CompareFunc? compare_func = null); public override bool add (G item); public override void clear (); public override bool contains (G item); public override Gee.Iterator iterator (); public override bool remove (G item); public GLib.CompareFunc compare_func { get; private set; } public override int size { get; } } [CCode (cheader_filename = "gee.h")] public interface BidirIterator : Gee.Iterator { public abstract bool has_previous (); public abstract bool last (); public abstract bool previous (); } [CCode (cheader_filename = "gee.h")] public interface Collection : Gee.Iterable { public abstract bool add (G item); public abstract bool add_all (Gee.Collection collection); public abstract void clear (); public abstract bool contains (G item); public abstract bool contains_all (Gee.Collection collection); public static Gee.Collection empty (); public abstract bool remove (G item); public abstract bool remove_all (Gee.Collection collection); public abstract bool retain_all (Gee.Collection collection); public abstract G[] to_array (); public abstract bool is_empty { get; } public abstract Gee.Collection read_only_view { owned get; } public abstract int size { get; } } [CCode (cheader_filename = "gee.h")] public interface Comparable : GLib.Object { public abstract int compare_to (G object); } [CCode (cheader_filename = "gee.h")] public interface Deque : Gee.Queue { public abstract int drain_head (Gee.Collection recipient, int amount = -1); public abstract int drain_tail (Gee.Collection recipient, int amount = -1); public abstract bool offer_head (G element); public abstract bool offer_tail (G element); public abstract G peek_head (); public abstract G peek_tail (); public abstract G poll_head (); public abstract G poll_tail (); } [CCode (cheader_filename = "gee.h")] public interface Iterable : GLib.Object { public abstract Gee.Iterator iterator (); public abstract GLib.Type element_type { get; } } [CCode (cheader_filename = "gee.h")] public interface Iterator : GLib.Object { public abstract bool first (); public abstract G @get (); public abstract bool has_next (); public abstract bool next (); public abstract void remove (); } [CCode (cheader_filename = "gee.h")] public interface List : Gee.Collection { public static Gee.List empty (); public abstract G first (); public abstract G @get (int index); public abstract int index_of (G item); public abstract void insert (int index, G item); public abstract void insert_all (int index, Gee.Collection collection); public abstract G last (); public abstract new Gee.ListIterator list_iterator (); public abstract G remove_at (int index); public abstract void @set (int index, G item); public abstract Gee.List? slice (int start, int stop); public abstract void sort (GLib.CompareFunc? compare_func = null); public abstract Gee.List read_only_view { owned get; } } [CCode (cheader_filename = "gee.h")] public interface ListIterator : Gee.BidirIterator { public abstract void add (G item); public abstract int index (); public abstract void insert (G item); public abstract void @set (G item); } [CCode (cheader_filename = "gee.h")] public interface Map : GLib.Object, Gee.Iterable> { [CCode (cheader_filename = "gee.h")] public abstract class Entry : GLib.Object { public Entry (); public abstract K key { get; } public abstract V value { get; set; } } public abstract void clear (); [Deprecated] public abstract bool contains (K key); [Deprecated] public abstract bool contains_all (Gee.Map map); public static Gee.Map empty (); public abstract V @get (K key); public abstract bool has (K key, V value); public abstract bool has_all (Gee.Map map); public abstract bool has_key (K key); public abstract Gee.MapIterator map_iterator (); [Deprecated] public abstract bool remove (K key, out V value = null); [Deprecated] public abstract bool remove_all (Gee.Map map); public abstract void @set (K key, V value); public abstract void set_all (Gee.Map map); public abstract bool unset (K key, out V value = null); public abstract bool unset_all (Gee.Map map); public abstract Gee.Set> entries { owned get; } public abstract bool is_empty { get; } public abstract GLib.Type key_type { get; } public abstract Gee.Set keys { owned get; } public abstract Gee.Map read_only_view { owned get; } public abstract int size { get; } public abstract GLib.Type value_type { get; } public abstract Gee.Collection values { owned get; } } [CCode (cheader_filename = "gee.h")] public interface MapIterator : GLib.Object { public abstract bool first (); public abstract K get_key (); public abstract V get_value (); public abstract bool has_next (); public abstract bool next (); public abstract void set_value (V value); public abstract void unset (); } [CCode (cheader_filename = "gee.h")] public interface MultiMap : GLib.Object { public abstract void clear (); public abstract bool contains (K key); public abstract Gee.Collection @get (K key); public abstract Gee.MultiSet get_all_keys (); public abstract Gee.Set get_keys (); public abstract Gee.Collection get_values (); public abstract bool remove (K key, V value); public abstract bool remove_all (K key); public abstract void @set (K key, V value); public abstract int size { get; } } [CCode (cheader_filename = "gee.h")] public interface MultiSet : Gee.Collection { public abstract int count (G item); } [CCode (cheader_filename = "gee.h")] public interface Queue : Gee.Collection { public const int UNBOUNDED_CAPACITY; public abstract int drain (Gee.Collection recipient, int amount = -1); public abstract bool offer (G element); public abstract G peek (); public abstract G poll (); public abstract int capacity { get; } public abstract bool is_full { get; } public abstract int remaining_capacity { get; } } [CCode (cheader_filename = "gee.h")] public interface Set : Gee.Collection { public static Gee.Set empty (); public abstract Gee.Set read_only_view { owned get; } } [CCode (cheader_filename = "gee.h")] public interface SortedSet : Gee.Set { public abstract Gee.BidirIterator bidir_iterator (); public abstract G ceil (G element); public abstract G first (); public abstract G floor (G element); public abstract Gee.SortedSet head_set (G before); public abstract G higher (G element); public abstract Gee.BidirIterator? iterator_at (G element); public abstract G last (); public abstract G lower (G element); public abstract Gee.SortedSet sub_set (G from, G to); public abstract Gee.SortedSet tail_set (G after); } [CCode (cheader_filename = "gee.h")] public static int direct_compare (void* _val1, void* _val2); } Gnome-Pie-0.5.4/vapi/libbamf3.vapi000066400000000000000000000146241204074113200166000ustar00rootroot00000000000000/* libbamf3.vapi generated by vapigen, do not modify. */ namespace Bamf { [CCode (cheader_filename = "libbamf3/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 (cheader_filename = "libbamf3/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 (cheader_filename = "libbamf3/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 (cheader_filename = "libbamf3/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_desktop_file (string desktop_file_path, bool create_if_not_found); 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 (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 (cheader_filename = "libbamf3/libbamf/libbamf.h")] public class Tab : Bamf.View { [CCode (has_construct_function = false)] public Tab (string id, string uri); public unowned string get_id (); public unowned string get_preview (); public unowned string get_uri (); public void set_preview (string uri); public void set_uri (string uri); public virtual void show (); [NoAccessorMethod] public string id { owned get; set construct; } public string preview { get; set; } public string uri { get; set construct; } public virtual signal void preview_updated (); public virtual signal void uri_changed (string new_uri, string p1); } [CCode (cheader_filename = "libbamf3/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 (string tab_id, GLib.Error error); [NoWrapper] public virtual unowned string tab_ids (); [NoWrapper] public virtual unowned GLib.Array tab_preview (string tab_id); [NoWrapper] public virtual unowned string tab_uri (string tab_id); [NoWrapper] public virtual uint32 tab_xid (string tab_id); [NoAccessorMethod] public string id { owned 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 (cheader_filename = "libbamf3/libbamf/libbamf.h")] public class View : GLib.InitiallyUnowned { [CCode (has_construct_function = false)] protected View (); [NoWrapper] public virtual Bamf.ClickBehavior click_behavior (); public virtual unowned GLib.List get_children (); public Bamf.ClickBehavior get_click_suggestion (); public virtual unowned string get_icon (); public virtual unowned string get_name (); public unowned string get_view_type (); public virtual bool is_active (); public bool is_closed (); public virtual bool is_running (); public bool is_sticky (); public virtual bool is_urgent (); [NoWrapper] public virtual void set_path (string path); public void set_sticky (bool value); public bool user_visible (); [NoWrapper] public virtual unowned string view_type (); [NoAccessorMethod] public bool active { get; } [NoAccessorMethod] public string path { owned get; } [NoAccessorMethod] public bool running { get; } [NoAccessorMethod] public bool urgent { get; } 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 name_changed (string old_name, string new_name); 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 (cheader_filename = "libbamf3/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 (cheader_filename = "libbamf3/libbamf/libbamf.h", cprefix = "BAMF_CLICK_BEHAVIOR_", has_type_id = false)] public enum ClickBehavior { NONE, OPEN, FOCUS, FOCUS_ALL, MINIMIZE, RESTORE, RESTORE_ALL, PICKER } [CCode (cheader_filename = "libbamf3/libbamf/libbamf.h", cprefix = "BAMF_WINDOW_", has_type_id = false)] public enum WindowType { NORMAL, DESKTOP, DOCK, DIALOG, TOOLBAR, MENU, UTILITY, SPLASHSCREEN } } Gnome-Pie-0.5.4/vapi/libgnome-menu-3.0.vapi000066400000000000000000000064631204074113200201570ustar00rootroot00000000000000/* libgnome-menu-3.0.vapi generated by vapigen, do not modify. */ namespace GMenu { [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h")] public class Tree : GLib.Object { [CCode (has_construct_function = false)] public Tree (string menu_basename, GMenu.TreeFlags flags); [CCode (has_construct_function = false)] public Tree.for_path (string menu_path, GMenu.TreeFlags flags); public unowned string get_canonical_menu_path (); public unowned GMenu.TreeDirectory get_directory_from_path (string path); public unowned GMenu.TreeEntry get_entry_by_id (string id); public unowned GMenu.TreeDirectory get_root_directory (); public static void* item_ref (void* item); public static void item_unref (void* item); public bool load_sync () throws GLib.Error; [NoAccessorMethod] public GMenu.TreeFlags flags { get; construct; } [NoAccessorMethod] public string menu_basename { owned get; construct; } [NoAccessorMethod] public string menu_path { owned get; construct; } public virtual signal void changed (); } [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h")] [Compact] public class TreeAlias { public unowned GMenu.TreeDirectory get_aliased_directory (); public unowned GMenu.TreeEntry get_aliased_entry (); public GMenu.TreeItemType get_aliased_item_type (); public unowned GMenu.TreeDirectory get_directory (); } [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h")] [Compact] public class TreeDirectory { public unowned string get_comment (); public unowned string get_desktop_file_path (); public unowned string get_generic_name (); public unowned GLib.Icon get_icon (); public bool get_is_nodisplay (); public unowned string get_menu_id (); public unowned string get_name (); public unowned GMenu.TreeDirectory get_parent (); public unowned GMenu.TreeIter iter (); public unowned string make_path (GMenu.TreeEntry entry); } [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h")] [Compact] public class TreeEntry { public unowned GLib.DesktopAppInfo get_app_info (); public unowned string get_desktop_file_id (); public unowned string get_desktop_file_path (); public bool get_is_excluded (); public unowned GMenu.TreeDirectory get_parent (); } [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h")] [Compact] public class TreeHeader { public unowned GMenu.TreeDirectory get_directory (); } [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h", ref_function = "gmenu_tree_iter_ref", unref_function = "gmenu_tree_iter_unref")] [Compact] public class TreeIter { public unowned GMenu.TreeAlias get_alias (); public unowned GMenu.TreeDirectory get_directory (); public unowned GMenu.TreeEntry get_entry (); public unowned GMenu.TreeHeader get_header (); public GMenu.TreeItemType next (); } [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h")] [Compact] public class TreeSeparator { } [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h", cprefix = "GMENU_TREE_FLAGS_")] [Flags] public enum TreeFlags { NONE, INCLUDE_EXCLUDED, SHOW_EMPTY, INCLUDE_NODISPLAY, SHOW_ALL_SEPARATORS, SORT_DISPLAY_NAME } [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h", cprefix = "GMENU_TREE_ITEM_", has_type_id = false)] public enum TreeItemType { INVALID, DIRECTORY, ENTRY, SEPARATOR, HEADER, ALIAS } } Gnome-Pie-0.5.4/vapi/libwnck-3.0.deps000066400000000000000000000000211204074113200170260ustar00rootroot00000000000000gio-2.0 gtk+-3.0 Gnome-Pie-0.5.4/vapi/libwnck-3.0.vapi000066400000000000000000000333611204074113200170470ustar00rootroot00000000000000/* libwnck-3.0.vapi generated by vapigen, do not modify. */ [CCode (cprefix = "Wnck", gir_namespace = "Wnck", gir_version = "3.0", lower_case_cprefix = "wnck_")] namespace Wnck { namespace Version { [CCode (cheader_filename = "libwnck/libwnck.h", cname = "WNCK_MAJOR_VERSION")] public const int MAJOR_VERSION; [CCode (cheader_filename = "libwnck/libwnck.h", cname = "WNCK_MICRO_VERSION")] public const int MICRO_VERSION; [CCode (cheader_filename = "libwnck/libwnck.h", cname = "WNCK_MINOR_VERSION")] public const int MINOR_VERSION; } [CCode (cheader_filename = "libwnck/libwnck.h", type_id = "wnck_action_menu_get_type ()")] public class ActionMenu : Gtk.Menu, Atk.Implementor, Gtk.Buildable { [CCode (has_construct_function = false, type = "GtkWidget*")] public ActionMenu (Wnck.Window window); [NoAccessorMethod] public void* window { get; construct; } } [CCode (cheader_filename = "libwnck/libwnck.h", type_id = "wnck_application_get_type ()")] public class Application : GLib.Object { [CCode (has_construct_function = false)] protected Application (); public static unowned Wnck.Application @get (ulong xwindow); public unowned Gdk.Pixbuf get_icon (); public bool get_icon_is_fallback (); public unowned string get_icon_name (); public unowned Gdk.Pixbuf get_mini_icon (); public int get_n_windows (); public unowned string get_name (); public int get_pid (); public unowned string get_startup_id (); public unowned GLib.List get_windows (); public ulong get_xid (); public virtual signal void icon_changed (); public virtual signal void name_changed (); } [CCode (cheader_filename = "libwnck/libwnck.h", type_id = "wnck_class_group_get_type ()")] public class ClassGroup : GLib.Object { [CCode (has_construct_function = false)] protected ClassGroup (); public static unowned Wnck.ClassGroup @get (string id); public unowned Gdk.Pixbuf get_icon (); public unowned string get_id (); public unowned Gdk.Pixbuf get_mini_icon (); public unowned string get_name (); public unowned string get_res_class (); public unowned GLib.List get_windows (); public virtual signal void icon_changed (); public virtual signal void name_changed (); } [CCode (cheader_filename = "libwnck/libwnck.h", type_id = "wnck_pager_get_type ()")] public class Pager : Gtk.Widget, Atk.Implementor, Gtk.Buildable { [CCode (has_construct_function = false, type = "GtkWidget*")] public Pager (); public void set_display_mode (Wnck.PagerDisplayMode mode); public bool set_n_rows (int n_rows); public bool set_orientation (Gtk.Orientation orientation); public void set_shadow_type (Gtk.ShadowType shadow_type); public void set_show_all (bool show_all_workspaces); } [CCode (cheader_filename = "libwnck/libwnck.h", type_id = "wnck_screen_get_type ()")] public class Screen : GLib.Object { [CCode (has_construct_function = false)] protected Screen (); public void calc_workspace_layout (int num_workspaces, int space_index, Wnck.WorkspaceLayout layout); public void change_workspace_count (int count); public void force_update (); public static void free_workspace_layout (Wnck.WorkspaceLayout layout); public static unowned Wnck.Screen @get (int index); public unowned Wnck.Window get_active_window (); public unowned Wnck.Workspace get_active_workspace (); public ulong get_background_pixmap (); public static unowned Wnck.Screen get_default (); public static unowned Wnck.Screen get_for_root (ulong root_window_id); public int get_height (); public int get_number (); public unowned Wnck.Window get_previously_active_window (); public bool get_showing_desktop (); public int get_width (); public unowned string get_window_manager_name (); public unowned GLib.List get_windows (); public unowned GLib.List get_windows_stacked (); public unowned Wnck.Workspace get_workspace (int workspace); public int get_workspace_count (); public unowned GLib.List get_workspaces (); public void move_viewport (int x, int y); public bool net_wm_supports (string atom); public void release_workspace_layout (int current_token); public void toggle_showing_desktop (bool show); public int try_set_workspace_layout (int current_token, int rows, int columns); public virtual signal void active_window_changed (Wnck.Window previous_window); public virtual signal void active_workspace_changed (Wnck.Workspace previous_workspace); public virtual signal void application_closed (Wnck.Application app); public virtual signal void application_opened (Wnck.Application app); public virtual signal void background_changed (); public virtual signal void class_group_closed (Wnck.ClassGroup class_group); public virtual signal void class_group_opened (Wnck.ClassGroup class_group); public virtual signal void showing_desktop_changed (); public virtual signal void viewports_changed (); public virtual signal void window_closed (Wnck.Window window); public virtual signal void window_manager_changed (); public virtual signal void window_opened (Wnck.Window window); public virtual signal void window_stacking_changed (); public virtual signal void workspace_created (Wnck.Workspace space); public virtual signal void workspace_destroyed (Wnck.Workspace space); } [CCode (cheader_filename = "libwnck/libwnck.h", type_id = "wnck_selector_get_type ()")] public class Selector : Gtk.MenuBar, Atk.Implementor, Gtk.Buildable { [CCode (has_construct_function = false, type = "GtkWidget*")] public Selector (); } [CCode (cheader_filename = "libwnck/libwnck.h", type_id = "wnck_tasklist_get_type ()")] public class Tasklist : Gtk.Container, Atk.Implementor, Gtk.Buildable { [CCode (has_construct_function = false, type = "GtkWidget*")] public Tasklist (); public int get_size_hint_list (int n_elements); public void set_button_relief (Gtk.ReliefStyle relief); public void set_grouping (Wnck.TasklistGroupingType grouping); public void set_grouping_limit (int limit); public void set_include_all_workspaces (bool include_all_workspaces); public void set_switch_workspace_on_unminimize (bool switch_workspace_on_unminimize); } [CCode (cheader_filename = "libwnck/libwnck.h", type_id = "wnck_window_get_type ()")] public class Window : GLib.Object { [CCode (has_construct_function = false)] protected Window (); public void activate (uint32 timestamp); public void activate_transient (uint32 timestamp); public void close (uint32 timestamp); public static unowned Wnck.Window @get (ulong xwindow); public Wnck.WindowActions get_actions (); public unowned Wnck.Application get_application (); public unowned Wnck.ClassGroup get_class_group (); public unowned string get_class_group_name (); public unowned string get_class_instance_name (); public void get_client_window_geometry (out int xp, out int yp, out int widthp, out int heightp); public void get_geometry (out int xp, out int yp, out int widthp, out int heightp); public ulong get_group_leader (); public unowned Gdk.Pixbuf get_icon (); public bool get_icon_is_fallback (); public unowned string get_icon_name (); public unowned Gdk.Pixbuf get_mini_icon (); public unowned string get_name (); public int get_pid (); public unowned Wnck.Screen get_screen (); public unowned string get_session_id (); public unowned string get_session_id_utf8 (); public int get_sort_order (); public Wnck.WindowState get_state (); public unowned Wnck.Window get_transient (); public Wnck.WindowType get_window_type (); public unowned Wnck.Workspace get_workspace (); public ulong get_xid (); public bool has_icon_name (); public bool has_name (); public bool is_above (); public bool is_active (); public bool is_below (); public bool is_fullscreen (); public bool is_in_viewport (Wnck.Workspace workspace); public bool is_maximized (); public bool is_maximized_horizontally (); public bool is_maximized_vertically (); public bool is_minimized (); public bool is_most_recently_activated (); public bool is_on_workspace (Wnck.Workspace workspace); public bool is_pinned (); public bool is_shaded (); public bool is_skip_pager (); public bool is_skip_tasklist (); public bool is_sticky (); public bool is_visible_on_workspace (Wnck.Workspace workspace); public void keyboard_move (); public void keyboard_size (); public void make_above (); public void make_below (); public void maximize (); public void maximize_horizontally (); public void maximize_vertically (); public void minimize (); public void move_to_workspace (Wnck.Workspace space); public bool needs_attention (); public bool or_transient_needs_attention (); public void pin (); public void set_fullscreen (bool fullscreen); public void set_geometry (Wnck.WindowGravity gravity, Wnck.WindowMoveResizeMask geometry_mask, int x, int y, int width, int height); public void set_icon_geometry (int x, int y, int width, int height); public void set_skip_pager (bool skip); public void set_skip_tasklist (bool skip); public void set_sort_order (int order); public void set_window_type (Wnck.WindowType wintype); public void shade (); public void stick (); public bool transient_is_most_recently_activated (); public void unmake_above (); public void unmake_below (); public void unmaximize (); public void unmaximize_horizontally (); public void unmaximize_vertically (); public void unminimize (uint32 timestamp); public void unpin (); public void unshade (); public void unstick (); public virtual signal void actions_changed (Wnck.WindowActions changed_mask, Wnck.WindowActions new_actions); public virtual signal void geometry_changed (); public virtual signal void icon_changed (); public virtual signal void name_changed (); public virtual signal void state_changed (Wnck.WindowState changed_mask, Wnck.WindowState new_state); public virtual signal void workspace_changed (); } [CCode (cheader_filename = "libwnck/libwnck.h", type_id = "wnck_workspace_get_type ()")] public class Workspace : GLib.Object { [CCode (has_construct_function = false)] protected Workspace (); public void activate (uint32 timestamp); public void change_name (string name); public int get_height (); public int get_layout_column (); public int get_layout_row (); public unowned string get_name (); public unowned Wnck.Workspace get_neighbor (Wnck.MotionDirection direction); public int get_number (); public unowned Wnck.Screen get_screen (); public int get_viewport_x (); public int get_viewport_y (); public int get_width (); public bool is_virtual (); public virtual signal void name_changed (); } [CCode (cheader_filename = "libwnck/libwnck.h")] public struct ResourceUsage { public ulong total_bytes_estimate; public ulong pixmap_bytes; public uint n_pixmaps; public uint n_windows; public uint n_gcs; public uint n_pictures; public uint n_glyphsets; public uint n_fonts; public uint n_colormap_entries; public uint n_passive_grabs; public uint n_cursors; public uint n_other; [CCode (cname = "wnck_pid_read_resource_usage")] public static Wnck.ResourceUsage pid_read (Gdk.Display gdk_display, ulong pid); [CCode (cname = "wnck_xid_read_resource_usage")] public static Wnck.ResourceUsage xid_read (Gdk.Display gdk_display, ulong xid); } [CCode (cheader_filename = "libwnck/libwnck.h")] public struct WorkspaceLayout { public int rows; public int cols; public int grid; public int grid_area; public int current_row; public int current_col; } [CCode (cheader_filename = "libwnck/libwnck.h", cprefix = "WNCK_CLIENT_TYPE_")] public enum ClientType { APPLICATION, PAGER } [CCode (cheader_filename = "libwnck/libwnck.h", cprefix = "WNCK_MOTION_")] public enum MotionDirection { UP, DOWN, LEFT, RIGHT } [CCode (cheader_filename = "libwnck/libwnck.h", cprefix = "WNCK_PAGER_DISPLAY_")] public enum PagerDisplayMode { NAME, CONTENT } [CCode (cheader_filename = "libwnck/libwnck.h", cprefix = "WNCK_TASKLIST_")] public enum TasklistGroupingType { NEVER_GROUP, AUTO_GROUP, ALWAYS_GROUP } [CCode (cheader_filename = "libwnck/libwnck.h", cprefix = "WNCK_WINDOW_ACTION_")] [Flags] public enum WindowActions { MOVE, RESIZE, SHADE, STICK, MAXIMIZE_HORIZONTALLY, MAXIMIZE_VERTICALLY, CHANGE_WORKSPACE, CLOSE, UNMAXIMIZE_HORIZONTALLY, UNMAXIMIZE_VERTICALLY, UNSHADE, UNSTICK, MINIMIZE, UNMINIMIZE, MAXIMIZE, UNMAXIMIZE, FULLSCREEN, ABOVE, BELOW } [CCode (cheader_filename = "libwnck/libwnck.h", cprefix = "WNCK_WINDOW_GRAVITY_")] public enum WindowGravity { CURRENT, NORTHWEST, NORTH, NORTHEAST, WEST, CENTER, EAST, SOUTHWEST, SOUTH, SOUTHEAST, STATIC } [CCode (cheader_filename = "libwnck/libwnck.h", cprefix = "WNCK_WINDOW_CHANGE_")] [Flags] public enum WindowMoveResizeMask { X, Y, WIDTH, HEIGHT } [CCode (cheader_filename = "libwnck/libwnck.h", cprefix = "WNCK_WINDOW_STATE_")] [Flags] public enum WindowState { MINIMIZED, MAXIMIZED_HORIZONTALLY, MAXIMIZED_VERTICALLY, SHADED, SKIP_PAGER, SKIP_TASKLIST, STICKY, HIDDEN, FULLSCREEN, DEMANDS_ATTENTION, URGENT, ABOVE, BELOW } [CCode (cheader_filename = "libwnck/libwnck.h", cprefix = "WNCK_WINDOW_")] public enum WindowType { NORMAL, DESKTOP, DOCK, DIALOG, TOOLBAR, MENU, UTILITY, SPLASHSCREEN } [CCode (cheader_filename = "libwnck/libwnck.h", cname = "_WnckLayoutCorner", cprefix = "WNCK_LAYOUT_CORNER_")] public enum _LayoutCorner { TOPLEFT, TOPRIGHT, BOTTOMRIGHT, BOTTOMLEFT } [CCode (cheader_filename = "libwnck/libwnck.h", cname = "_WnckLayoutOrientation", cprefix = "WNCK_LAYOUT_ORIENTATION_")] public enum _LayoutOrientation { HORIZONTAL, VERTICAL } [CCode (cheader_filename = "libwnck/libwnck.h")] public static void set_client_type (Wnck.ClientType ewmh_sourceindication_client_type); } Gnome-Pie-0.5.4/vapi/unique-3.0.deps000066400000000000000000000000711204074113200167100ustar00rootroot00000000000000gio-2.0 cairo atk pango gdk-3.0 gdk-pixbuf-2.0 gtk+-3.0 Gnome-Pie-0.5.4/vapi/unique-3.0.vapi000066400000000000000000000071361204074113200167250ustar00rootroot00000000000000/* unique-3.0.vapi generated by vapigen, do not modify. */ /* Pulled from http://permalink.gmane.org/gmane.linux.redhat.fedora.devel/147876 */ [CCode (cprefix = "Unique", lower_case_cprefix = "unique_")] namespace Unique { [CCode (cheader_filename = "unique/uniqueapp.h")] public class App : GLib.Object { [CCode (has_construct_function = false)] public App (string name, string? startup_id); public void add_command (string command_name, int command_id); public bool is_running (); public Unique.Response send_message (int command_id, Unique.MessageData? message_data); public void watch_window (Gtk.Window window); [CCode (has_construct_function = false)] public App.with_commands (string name, string startup_id, ...); [NoAccessorMethod] public string name { owned get; construct; } [NoAccessorMethod] public Gdk.Screen screen { owned get; set construct; } [NoAccessorMethod] public string startup_id { owned get; construct; } public virtual signal Unique.Response message_received (int command, Unique.MessageData message_data, uint time_); } [CCode (cheader_filename = "unique/uniquebackend.h")] public class Backend : GLib.Object { public weak string name; public weak Unique.App parent; public weak Gdk.Screen screen; public weak string startup_id; public uint workspace; [CCode (has_construct_function = false)] protected Backend (); public static unowned Unique.Backend create (); public unowned string get_name (); public unowned Gdk.Screen get_screen (); public unowned string get_startup_id (); public uint get_workspace (); public virtual bool request_name (); public virtual Unique.Response send_message (int command_id, Unique.MessageData message_data, uint time_); public void set_name (string name); public void set_screen (Gdk.Screen screen); public void set_startup_id (string startup_id); } [Compact] [CCode (copy_function = "unique_message_data_copy", type_id = "UNIQUE_TYPE_MESSAGE_DATA", cheader_filename = "unique/uniquemessage.h")] public class MessageData { [CCode (has_construct_function = false)] public MessageData (); public unowned Unique.MessageData copy (); public unowned uchar[] @get (size_t length); public unowned string get_filename (); public unowned Gdk.Screen get_screen (); public unowned string get_startup_id (); public unowned string get_text (); public unowned string get_uris (); public uint get_workspace (); public void @set (uchar[] data, ssize_t length); public void set_filename (string filename); public bool set_text (string str, ssize_t length); public bool set_uris (string uris); } [CCode (cprefix = "UNIQUE_", cheader_filename = "unique/uniqueenumtypes.h")] public enum Command { INVALID, ACTIVATE, NEW, OPEN, CLOSE } [CCode (cprefix = "UNIQUE_RESPONSE_", cheader_filename = "unique/uniqueenumtypes.h")] public enum Response { INVALID, OK, CANCEL, FAIL, PASSTHROUGH } [CCode (cheader_filename = "unique/uniqueversion.h")] public const string API_VERSION_S; [CCode (cheader_filename = "unique/uniqueversion.h")] public const string DEFAULT_BACKEND_S; [CCode (cheader_filename = "unique/uniqueversion.h")] public const int MAJOR_VERSION; [CCode (cheader_filename = "unique/uniqueversion.h")] public const int MICRO_VERSION; [CCode (cheader_filename = "unique/uniqueversion.h")] public const int MINOR_VERSION; [CCode (cheader_filename = "unique/uniqueversion.h")] public const string PROTOCOL_VERSION_S; [CCode (cheader_filename = "unique/uniqueversion.h")] public const int VERSION_HEX; [CCode (cheader_filename = "unique/uniqueversion.h")] public const string VERSION_S; } Gnome-Pie-0.5.4/vapi/x11.vapi000066400000000000000000000634311204074113200155320ustar00rootroot00000000000000/* x11.vapi * * Copyright (C) 2009 Jürg Billeter * Copyright (C) 2011 Alexander Kurtz * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Authors: * Jürg Billeter * Alexander Kurtz */ [CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "X11/Xlib.h,X11/Xatom.h,X11/Xutil.h,X11/Xregion.h")] namespace X { // Note: must be called before opening a display or calling any other Xlib function, // see http://tronche.com/gui/x/xlib/display/XInitThreads.html [CCode (cname = "XInitThreads")] public Status init_threads (); [Compact] [CCode (cname = "Display", ref_function = "", unref_function = "")] public class Display { [CCode (cname = "XOpenDisplay")] public Display (string? name = null); [CCode (cname = "XAllPlanes")] public static ulong get_all_planes (); [CCode (cname = "XActivateScreenSaver")] public void activate_screensaver (); [CCode (cname = "XAddToSaveSet")] public int add_to_save_set (Window w); [CCode (cname = "XAllowEvents")] public int allow_events (int event_mode, int time); [CCode (cname = "XBitmapBitOrder")] public int bitmap_bit_order (); [CCode (cname = "XBitmapUnit")] public int bitmap_scanline_unit (); [CCode (cname = "XBitmapPad")] public int bitmap_scanline_padding (); [CCode (cname = "XChangeProperty")] public int change_property (Window w, Atom property, Atom type, int format, int mode, [CCode (array_length = false)] uchar[] data, int nelements); [CCode (cname = "XChangeWindowAttributes")] public int change_window_attributes (Window w, ulong valuemask, SetWindowAttributes attributes); [CCode (cname = "XConfigureWindow")] public int configure_window (Window w, uint value_mask, WindowChanges values); [CCode (cname = "ConnectionNumber")] public int connection_number (); [CCode (cname = "DefaultRootWindow")] public Window default_root_window (); [CCode (cname = "XDefaultScreenOfDisplay")] public unowned Screen default_screen (); [CCode (cname = "XScreenOfDisplay")] public unowned Screen screen_by_id (int screen_number); [CCode (cname = "DisplayString")] public string display_string (); [CCode (cname = "XQLength")] public int event_queue_length (); [CCode (cname = "XFlush")] public int flush (); [CCode (cname = "XForceScreenSaver")] public void force_screensaver (int mode); [CCode (cname = "XGetKeyboardMapping", array_length = false)] public unowned uint[] get_keyboard_mapping (uint first_keycode, int keycode_count, ref int keysyms_per_keycode_return); [CCode (cname = "XGetModifierMapping")] public ModifierKeymap get_modifier_mapping (); [CCode (cname = "XGetScreenSaver")] public void get_screensaver (out int timeout, out int interval, out int prefer_blanking, out int allow_exposures); [CCode (cname = "XGetSelectionOwner")] public Window get_selection_owner (Atom selection); [CCode (cname = "XGetWindowAttributes")] public void get_window_attributes (Window w, out WindowAttributes window_attributes_return); [CCode (cname = "XGetWindowProperty")] public int get_window_property (Window w, Atom property, long long_offset, long long_length, bool delete, Atom req_type, out Atom actual_type_return, out int actual_format_return, out ulong nitems_return, out ulong bytes_after_return, [CCode (type = "unsigned char **")] out void* prop_return); [CCode (cname = "XGrabButton")] public int grab_button (uint button, uint modifiers, Window grab_window, bool owner_events, uint event_mask, int pointer_mode, int keyboard_mode, Window confine_to, uint cursor); [CCode (cname = "XGrabKey")] public int grab_key (int keycode, uint modifiers, Window grab_window, bool owner_events, int pointer_mode, int keyboard_mode); [CCode (cname = "XGrabPointer")] public int grab_pointer (Window grab_window, bool owner_events, uint event_mask, int pointer_mode, int keyboard_mode, Window confine_to, uint cursor, int time); [CCode (cname = "XGrabServer")] public int grab_server (); [CCode (cname = "XImageByteOrder")] public int image_byte_order (); [CCode (cname = "XInternAtom")] public Atom intern_atom (string atom_name, bool only_if_exists); [CCode (cname = "XInternAtoms")] public void intern_atoms (string[] names, bool only_if_exists, [CCode (array_length = false)] Atom[] atoms_return); [CCode (cname = "XInternalConnectionNumbers")] public Status internal_connection_numbers (ref int[] fd_return); [CCode (cname = "XDisplayKeycodes")] public int keycodes (ref int min_keycodes_return, ref int max_keycodes_return); [CCode (cname = "XKeysymToKeycode")] public int keysym_to_keycode (uint keysym); [CCode (cname = "XLastKnownRequestProcessed")] public ulong last_known_request_processed (); [CCode (cname = "XLockDisplay")] public void lock_display (); [CCode (cname = "XMapWindow")] public int map_window (Window w); [CCode (cname = "XMaxRequestSize")] public long max_request_size (); [CCode (cname = "XExtendedMaxRequestSize")] public long max_extended_request_size (); [CCode (cname = "XEventsQueued")] public int events_queued (int mode); [CCode (cname = "XNextEvent")] public int next_event (ref Event event_return); [CCode (cname = "XNextRequest")] public ulong next_request (); [CCode (cname = "XNoOp")] public void no_operation (); [CCode (cname = "XScreenCount")] public int number_of_screens (); [CCode (cname = "XPending")] public int pending (); [CCode (cname = "XProcessInternalConnection")] public void process_internal_connection (int fd); [CCode (cname = "XProtocolVersion")] public int protocol_version (); [CCode (cname = "XProtocolRevision")] public int protocol_revision (); [CCode (cname = "XRaiseWindow")] public int raise_window (Window w); [CCode (cname = "XReparentWindow")] public int reparent_window (Window w, Window parent, int x, int y); [CCode (cname = "XResetScreenSaver")] public void reset_screensaver (); [CCode (cname = "XResizeWindow")] public int resize_window (Window w, uint width, uint height); [CCode (cname = "XRootWindow")] public Window root_window (int screen_number); [CCode (cname = "ScreenCount")] public int screen_count (); [CCode (cname = "XScreenOfDisplay")] public unowned Screen screen_of_display (int screen_number); [CCode (cname = "XSelectInput")] public int select_input (Window w, long event_mask); [CCode (cname = "XSendEvent")] public void send_event (Window w, bool propagate, long event_mask, ref Event event_send); [CCode (cname = "XSetCloseDownMode")] public void set_close_down_mode (int close_mode); [CCode (cname = "XSetScreenSaver")] public void set_screensaver (int timeout, int interval, int prefer_blanking, int allow_exposures); [CCode (cname = "XSetSelectionOwner")] public Window set_selection_owner (Atom selection, Window owner, int time); [CCode (cname = "XSetInputFocus")] public int set_input_focus (Window focus, int revert_to, int time); [CCode (cname = "XUngrabButton")] public int ungrab_button (uint button, uint modifiers, Window grab_window); [CCode (cname = "XUngrabKey")] public int ungrab_key (int keycode, uint modifiers, Window grab_window); [CCode (cname = "XUngrabPointer")] public int ungrab_pointer (int time); [CCode (cname = "XUngrabServer")] public int ungrab_server (); [CCode (cname = "XUnlockDisplay")] public void unlock_display (); [CCode (cname = "XUnmapWindow")] public int unmap_window (Window w); [CCode (cname = "XQueryTree")] public void query_tree (Window w, out Window root_return, out Window parent_return, out Window[] children_return); [CCode (cname = "XWindowEvent")] public int window_event (Window w, EventMask event_mask, out Event event_return); [CCode (cname = "XServerVendor")] public string xserver_vendor_name (); [CCode (cname = "XVendorRelease")] public string xserver_vendor_release (); [CCode (cname = "XMoveWindow")] public void move_window (Window window, int x, int y); } [Compact] [CCode (cname = "XModifierKeymap", free_function = "XFreeModifiermap")] public class ModifierKeymap { // The server's max # of keys per modifier public int max_keypermod; // An 8 by max_keypermod array of modifiers public uchar[] modifiermap; } [SimpleType] [IntegerType (rank = 9)] [CCode (cname = "Atom")] public struct Atom { } [SimpleType] [IntegerType (rank = 9)] [CCode (cname = "Colormap")] public struct Colormap { } [SimpleType] [CCode (cname = "GC")] public struct GC { } [SimpleType] [IntegerType (rank = 9)] [CCode (cname = "Status")] public struct Status { } [SimpleType] [IntegerType (rank = 9)] [CCode (cname = "XID", type_id = "G_TYPE_INT", marshaller_type_name = "INT", get_value_function = "g_value_get_int", set_value_function = "g_value_set_int", default_value = "0", type_signature = "i")] public struct ID { } [SimpleType] [IntegerType (rank = 9)] [CCode (cname = "Drawable", type_id = "G_TYPE_INT", marshaller_type_name = "INT", get_value_function = "g_value_get_int", set_value_function = "g_value_set_int", default_value = "0", type_signature = "i")] public struct Drawable : ID { } [SimpleType] [IntegerType (rank = 9)] [CCode (cname = "Window", type_id = "G_TYPE_INT", marshaller_type_name = "INT", get_value_function = "g_value_get_int", set_value_function = "g_value_set_int", default_value = "0", type_signature = "i")] public struct Window : Drawable { } [SimpleType] [IntegerType (rank = 9)] [CCode (cname = "Pixmap", type_id = "G_TYPE_INT", marshaller_type_name = "INT", get_value_function = "g_value_get_int", set_value_function = "g_value_set_int", default_value = "0", type_signature = "i")] public struct Pixmap : Drawable { } [SimpleType] [IntegerType (rank = 9)] [CCode (cname = "Mask")] public struct Mask { } [SimpleType] [IntegerType (rank = 9)] [CCode (cname = "VisualID")] public struct VisualID { } [SimpleType] [IntegerType (rank = 9)] [CCode (cname = "Time")] public struct Time { } [SimpleType] [IntegerType (rank = 9)] [CCode (cname = "Cursor")] public struct Cursor { } [SimpleType] [IntegerType (rank = 9)] [CCode (cname = "GContext")] public struct GContext { } [SimpleType] [IntegerType (rank = 9)] [CCode (cname = "KeySym")] public struct KeySym { } [SimpleType] [IntegerType (rank = 9)] [CCode (cname = "KeyCode")] public struct KeyCode { } public struct Visual { } public struct WindowChanges { public int x; public int y; public int width; public int height; public int border_width; public Window sibling; public int stack_mode; } public struct SizeHints { public long @flags; public int x; public int y; public int width; public int height; } [CCode (cname = "XCreateWindow")] public Window create_window (Display display, Window parent, int x, int y, uint width, uint height, uint border_width, int depth, uint @class, Visual? visual, X.CW valuemask, ref SetWindowAttributes attributes); [CCode (cname = "XSetWindowAttributes")] public struct SetWindowAttributes { // public Pixmap background_pixmap; /* background or None or ParentRelative */ public ulong background_pixel; /* background pixel */ // public Pixmap border_pixmap; /* border of the window */ public ulong border_pixel; /* border pixel value */ public int bit_gravity; /* one of bit gravity values */ public int win_gravity; /* one of the window gravity values */ public int backing_store; /* NotUseful, WhenMapped, Always */ public ulong backing_planes;/* planes to be preseved if possible */ public ulong backing_pixel;/* value to use in restoring planes */ public bool save_under; /* should bits under be saved? (popups) */ public long event_mask; /* set of events that should be saved */ public long do_not_propagate_mask; /* set of events that should not propagate */ public bool override_redirect; /* boolean value for override-redirect */ // public Colormap colormap; /* color map to be associated with window */ // public Cursor cursor; /* cursor to be displayed (or None) */ } [CCode(cname = "XWindowAttributes", cheader_filename = "X11/Xlib.h,X11/Xatom.h,X11/Xutil.h")] public struct WindowAttributes { public int x; public int y; /* location of window */ public int width; public int height; /* width and height of window */ public int border_width; /* border width of window */ public int depth; /* depth of window */ public Visual visual; /* the associated visual structure */ public Window root; /* root of screen containing window */ public int @class; /* InputOutput, InputOnly*/ public int bit_gravity; /* one of bit gravity values */ public int win_gravity; /* one of the window gravity values */ public int backing_store; /* NotUseful, WhenMapped, Always */ public ulong backing_planes;/* planes to be preserved if possible */ public ulong backing_pixel;/* value to be used when restoring planes */ public bool save_under; /* boolean, should bits under be saved? */ // public Colormap colormap; /* color map to be associated with window */ public bool map_installed; /* boolean, is color map currently installed*/ public int map_state; /* IsUnmapped, IsUnviewable, IsViewable */ public long all_event_masks; /* set of events all people have interest in*/ public long your_event_mask; /* my event mask */ public long do_not_propagate_mask; /* set of events that should not propagate */ public bool override_redirect; /* boolean value for override-redirect */ // public Screen screen; /* back pointer to correct screen */ } [CCode (cname = "CopyFromParent")] public const int COPY_FROM_PARENT; [CCode (cname = "CurrentTime")] public const ulong CURRENT_TIME; [CCode (cname = "Success")] public int Success; [CCode (cname = "XFree")] public int free (void* data); [CCode (cprefix = "CW", cname = "int")] public enum CW { BackPixmap, BackPixel, BackingStore, BackingPlanes, BackingPixel, BitGravity, BorderPixmap, BorderPixel, BorderWidth, Colormap, Cursor, DontPropagate, EventMask, Height, OverrideRedirect, SaveUnder, Sibling, StackMode, X, Y, Width, WinGravity } [CCode (cprefix = "GrabMode")] public enum GrabMode { Sync, Async } [CCode (cprefix = "")] public enum EventMask { NoEventMask, KeyPressMask, KeyReleaseMask, ButtonPressMask, ButtonReleaseMask, EnterWindowMask, LeaveWindowMask, PointerMotionMask, PointerMotionHintMask, Button1MotionMask, Button2MotionMask, Button3MotionMask, Button4MotionMask, Button5MotionMask, ButtonMotionMask, KeymapStateMask, ExposureMask, VisibilityChangeMask, StructureNotifyMask, ResizeRedirectMask, SubstructureNotifyMask, SubstructureRedirectMask, FocusChangeMask, PropertyChangeMask, ColormapChangeMask, OwnerGrabButtonMask } [CCode (cprefix = "")] public enum KeyMask { ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask } [CCode (cprefix = "")] public enum EventType { KeyPress, KeyRelease, ButtonPress, ButtonRelease, MotionNotify, EnterNotify, LeaveNotify, FocusIn, FocusOut, KeymapNotify, Expose, GraphicsExpose, NoExpose, VisibilityNotify, CreateNotify, DestroyNotify, UnmapNotify, MapNotify, MapRequest, ReparentNotify, ConfigureNotify, ConfigureRequest, GravityNotify, ResizeRequest, CirculateNotify, CirculateRequest, PropertyNotify, SelectionClear, SelectionRequest, SelectionNotify, ColormapNotify, ClientMessage, MappingNotify } // union [CCode (cname = "XEvent")] public struct Event { public int type; public AnyEvent xany; public KeyEvent xkey; public ButtonEvent xbutton; public MotionEvent xmotion; public CrossingEvent xcrossing; public CreateWindowEvent xcreatewindow; public DestroyWindowEvent xdestroywindow; public UnmapEvent xunmap; public MapEvent xmap; public MapRequestEvent xmaprequest; public ReparentEvent xreparent; public ConfigureEvent xconfigure; public GravityEvent xgravity; public ConfigureRequestEvent xconfigurerequest; public CirculateEvent xcirculate; public CirculateRequestEvent xcirculaterequest; public PropertyEvent xproperty; public SelectionEvent xselection; public ClientMessageEvent xclient; } [CCode (cname = "XAnyEvent")] public struct AnyEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window window; } [CCode (cname = "XKeyEvent")] public struct KeyEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window window; public Window root; public Window subwindow; public ulong time; public int x; public int y; public int x_root; public int y_root; public uint state; public uint keycode; public bool same_screen; } [CCode (cname = "XButtonEvent")] public struct ButtonEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window window; public Window subwindow; public ulong time; public int x; public int y; public int x_root; public int y_root; public uint state; public uint button; public bool same_screen; } [CCode (cname = "XMotionEvent")] public struct MotionEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window window; public Window subwindow; public ulong time; public int x; public int y; public int x_root; public int y_root; public uint state; public char is_hint; public bool same_screen; } [CCode (cname = "XCrossingEvent")] public struct CrossingEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window window; public Window root; public Window subwindow; public ulong time; public int x; public int y; public int x_root; public int y_root; public int mode; public int detail; public bool same_screen; public bool focus; public uint state; } [CCode (cname = "XCreateWindowEvent")] public struct CreateWindowEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window parent; public Window window; public int x; public int y; public int width; public int height; public int border_width; public bool override_redirect; } [CCode (cname = "XDestroyWindowEvent")] public struct DestroyWindowEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window event; public Window window; } [CCode (cname = "XUnmapEvent")] public struct UnmapEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window event; public Window window; public bool from_configure; } [CCode (cname = "XMapEvent")] public struct MapEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window event; public Window window; public bool override_redirect; } [CCode (cname = "XMapRequestEvent")] public struct MapRequestEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window parent; public Window window; } [CCode (cname = "XReparentEvent")] public struct ReparentEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window event; public Window window; public Window parent; public int x; public int y; public bool override_redirect; } [CCode (cname = "XConfigureEvent")] public struct ConfigureEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window event; public Window window; public int x; public int y; public int width; public int height; public int border_width; public Window above; public bool override_redirect; } [CCode (cname = "XGravityEvent")] public struct GravityEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window event; public Window window; public int x; public int y; } [CCode (cname = "XConfigureRequestEvent")] public struct ConfigureRequestEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window parent; public Window window; public int x; public int y; public int width; public int height; public int border_width; public Window above; public int detail; public ulong value_mask; } [CCode (cname = "XCirculateEvent")] public struct CirculateEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window event; public Window window; public int place; } [CCode (cname = "XCirculateRequestEvent")] public struct CirculateRequestEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window parent; public Window window; public int place; } [CCode (cname = "XPropertyEvent")] public struct PropertyEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window window; public Atom atom; public ulong time; public int state; } [CCode (cname = "XSelectionEvent")] public struct SelectionEvent { public int type; public ulong serial; public bool send_event; public unowned Display display; public Window requestor; public Atom selection; public Atom target; public Atom property; public ulong time; } [CCode (cname = "XClientMessageEvent")] public struct ClientMessageEvent { public int type; public ulong serial; /* # of last request processed by server */ public bool send_event; /* true if this came from a SendEvent request */ public unowned Display display; /* Display the event was read from */ public Window window; public Atom message_type; public int format; public ClientMessageEventData data; } [CCode (cname = "RECTANGLE", has_type_id = false)] public struct Rectangle { public short x; public short y; public short width; public short height; } // union public struct ClientMessageEventData { public unowned char[] b; public unowned short[] s; public unowned long[] l; } [CCode (cprefix = "Queued")] public enum QueuedMode { Already, AfterFlush, AfterReading } [CCode (cprefix = "PropMode")] public enum PropMode { Replace, Prepend, Append } [CCode (cprefix = "")] public enum AllowEventsMode { AsyncPointer, SyncPointer, ReplayPointer, AsyncKeyboard, SyncKeyboard, ReplayKeyboard, AsyncBoth, SyncBoth } [CCode (cprefix = "")] public enum MapState { IsUnmapped, IsUnviewable, IsViewable } [CCode (cprefix = "RevertTo")] public enum RevertTo { None, PointerRoot, Parent } [Compact] [CCode (cname = "Screen")] public class Screen { public Display display; public Window root; public int width; public int height; [CCode (cname = "XScreenOfDisplay")] public static unowned Screen get_screen (Display disp, int screen_number); [CCode (cname = "XBlackPixelOfScreen")] public ulong black_pixel_of_screen (); [CCode (cname = "XCellsOfScreen")] public int cells_of_screen (); [CCode (cname = "XDefaultColormapOfScreen")] public Colormap default_colormap_of_screen (); [CCode (cname = "XDefaultDepthOfScreen")] public int default_depth_of_screen (); [CCode (cname = "XDefaultGCOfScreen")] public GC default_gc_of_screen (); [CCode (cname = "XDefaultVisualOfScreen")] public Visual default_visual_of_screen (); [CCode (cname = "XDisplayOfScreen")] public unowned Display display_of_screen (); [CCode (cname = "XDoesBackingStore")] public int does_backing_store (); [CCode (cname = "XDoesSaveUnders")] public bool does_save_unders (); [CCode (cname = "XEventMaskOfScreen")] public long event_mask_of_Screen (); [CCode (cname = "XHeightMMOfScreen")] public int height_in_mm_of_screen (); [CCode (cname = "XHeightOfScreen")] public int height_of_screen (); [CCode (cname = "XMaxCmapsOfScreen")] public int max_colormaps_of_screen (); [CCode (cname = "XMinCmapsOfScreen")] public int min_colormaps_of_screen (); [CCode (cname = "XPlanesOfScreen")] public int planes_of_screen (); [CCode (cname = "XRootWindowOfScreen")] public Window root_window_of_screen (); [CCode (cname = "XScreenNumberOfScreen")] public int screen_number_of_screen (); [CCode (cname = "XWhitePixelOfScreen")] public ulong white_pixel_of_screen (); [CCode (cname = "XWidthMMOfScreen")] public int width_in_mm_of_screen (); [CCode (cname = "XWidthOfScreen")] public int width_of_screen (); } public const X.ID None; public const X.Atom XA_ATOM; public const X.Atom XA_CARDINAL; public const X.Atom XA_WINDOW; public const X.Atom XA_WM_CLASS; public const X.Atom XA_WM_HINTS; public const X.Atom XA_WM_ICON_NAME; public const X.Atom XA_WM_NAME; public const X.Atom XA_WM_NORMAL_HINTS; public const X.Atom XA_WM_TRANSIENT_FOR; public const uint XK_Num_Lock; public const uint XK_Scroll_Lock; public const uint XK_Super_L; public const uint XK_Super_R; } Gnome-Pie-0.5.4/vapi/xtst.vapi000066400000000000000000000047251204074113200161240ustar00rootroot00000000000000/* xtst.vapi * * Copyright (C) 2011 Alexander Kurtz * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Author: * Alexander Kurtz */ [CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "X11/extensions/XTest.h")] namespace X { class Test { [CCode (cname = "XTestQueryExtension")] public static bool query_extension(Display display, out int event_base_return, out int error_base_return, out int major_version_return, out int minor_version_return); [CCode (cname = "XTestCompareCursorWithWindow")] public static bool compare_cursor_with_window(Display display, Window window, Cursor cursor); [CCode (cname = "XTestCompareCurrentCursorWithWindow")] public static bool compare_current_cursor_with_window(Display display, Window window); [CCode (cname = "XTestFakeKeyEvent")] public static int fake_key_event(Display display, uint keycode, bool is_press, ulong delay); [CCode (cname = "XTestFakeButtonEvent")] public static int fake_button_event(Display display, uint button, bool is_press, ulong delay); [CCode (cname = "XTestFakeMotionEvent")] public static int fake_motion_event(Display display, int screen_number, int x, int y, ulong delay); [CCode (cname = "XTestFakeRelativeMotionEvent")] public static int fake_relative_motion_event(Display display, int screen_number, int x, int y, ulong delay); [CCode (cname = "XTestGrabControl")] public static int grab_control(Display display, bool impervious); [CCode (cname = "XTestSetGContextOfGC")] public static void set_g_context_of_gc(GC gc, GContext gid); [CCode (cname = "XTestSetVisualIDOfVisual")] public static void set_visual_id_of_visual(Visual visual, VisualID visualid); [CCode (cname = "XTestDiscard")] public static Status discard(Display display); } }