summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ghedini <al3xbio@gmail.com>2012-01-21 19:07:09 +0100
committerAlessandro Ghedini <al3xbio@gmail.com>2012-01-21 19:07:09 +0100
commit60560a030fda3c539ff9dc1563b9926414a193da (patch)
tree77590b395685a8d48d3615e45629a1610d08c071
parentd6b2677825cbb423e2099563c16321c3e23d7899 (diff)
Imported Upstream version 0.4.0upstream/0.4.0
-rw-r--r--.gitignore3
-rw-r--r--.valencia3
-rw-r--r--AUTHORS3
-rw-r--r--CMakeLists.txt78
-rw-r--r--INSTALL21
-rw-r--r--Makefile2
-rw-r--r--README85
-rw-r--r--README.md83
-rw-r--r--TRANSLATING2
-rw-r--r--resources/gnome-pie-indicator.svg770
-rwxr-xr-xresources/locale/compile-po.sh1
-rw-r--r--resources/locale/de/LC_MESSAGES/de.po584
-rw-r--r--resources/locale/de/LC_MESSAGES/gnomepie.mobin7817 -> 8399 bytes
-rw-r--r--resources/locale/es/LC_MESSAGES/es.po661
-rw-r--r--resources/locale/es/LC_MESSAGES/gnomepie.mobin0 -> 7223 bytes
-rw-r--r--resources/locale/fr/LC_MESSAGES/fr.po635
-rw-r--r--resources/locale/fr/LC_MESSAGES/gnomepie.mobin0 -> 3119 bytes
-rwxr-xr-xresources/locale/gen-pot.sh18
-rw-r--r--resources/locale/gnomepie.pot425
-rw-r--r--resources/locale/it/LC_MESSAGES/gnomepie.mobin8001 -> 3185 bytes
-rw-r--r--resources/locale/it/LC_MESSAGES/it.po766
-rw-r--r--resources/locale/ko/LC_MESSAGES/gnomepie.mobin8135 -> 3153 bytes
-rw-r--r--resources/locale/ko/LC_MESSAGES/ko.po736
-rw-r--r--resources/locale/pt-br/LC_MESSAGES/gnomepie.mobin7946 -> 3063 bytes
-rw-r--r--resources/locale/pt-br/LC_MESSAGES/pt-br.mobin7946 -> 0 bytes
-rw-r--r--resources/locale/pt-br/LC_MESSAGES/pt-br.po754
-rw-r--r--resources/locale/ru/LC_MESSAGES/gnomepie.mobin0 -> 9727 bytes
-rw-r--r--resources/locale/ru/LC_MESSAGES/ru.po656
-rw-r--r--resources/themes/adwaita/preview.pngbin0 -> 1412 bytes
-rw-r--r--resources/themes/bright/preview.pngbin0 -> 2543 bytes
-rw-r--r--resources/themes/elementary/preview.pngbin0 -> 1410 bytes
-rw-r--r--resources/themes/funky/preview.pngbin0 -> 956 bytes
-rw-r--r--resources/themes/gloss/preview.pngbin0 -> 1965 bytes
-rw-r--r--resources/themes/o-pie/preview.pngbin0 -> 2248 bytes
-rw-r--r--resources/themes/slim/preview.pngbin0 -> 502 bytes
-rw-r--r--resources/themes/unity/preview.pngbin0 -> 2933 bytes
-rw-r--r--resources/ui/icon_select.ui187
-rw-r--r--resources/ui/preferences.ui348
-rw-r--r--resources/ui/rename_pie.ui95
-rw-r--r--resources/ui/settings.ui199
-rw-r--r--resources/ui/slice_select.ui415
-rw-r--r--resources/ui/trigger_select.ui208
-rw-r--r--src/CMakeLists.txt15
-rw-r--r--src/actionGroups/actionGroup.vala21
-rw-r--r--src/actionGroups/bookmarkGroup.vala11
-rw-r--r--src/actionGroups/clipboardGroup.vala11
-rw-r--r--src/actionGroups/devicesGroup.vala11
-rw-r--r--src/actionGroups/groupRegistry.vala86
-rw-r--r--src/actionGroups/menuGroup.vala11
-rw-r--r--src/actionGroups/sessionGroup.vala11
-rw-r--r--src/actionGroups/windowListGroup.vala11
-rw-r--r--src/actions/action.vala10
-rw-r--r--src/actions/actionRegistry.vala102
-rw-r--r--src/actions/appAction.vala16
-rw-r--r--src/actions/keyAction.vala18
-rw-r--r--src/actions/pieAction.vala16
-rw-r--r--src/actions/sigAction.vala4
-rw-r--r--src/actions/uriAction.vala18
-rw-r--r--src/deamon.vala28
-rw-r--r--src/gui/aboutWindow.vala (renamed from src/gui/about.vala)29
-rw-r--r--src/gui/cellRendererIcon.vala132
-rw-r--r--src/gui/cellRendererTrigger.vala84
-rw-r--r--src/gui/iconSelectWindow.vala428
-rw-r--r--src/gui/indicator.vala14
-rw-r--r--src/gui/newSliceWindow.vala394
-rw-r--r--src/gui/pieComboList.vala155
-rw-r--r--src/gui/pieList.vala1105
-rw-r--r--src/gui/piePreview.vala369
-rw-r--r--src/gui/piePreviewAddSign.vala220
-rw-r--r--src/gui/piePreviewCenter.vala108
-rw-r--r--src/gui/piePreviewDeleteSign.vala195
-rw-r--r--src/gui/piePreviewRenderer.vala436
-rw-r--r--src/gui/piePreviewSliceRenderer.vala276
-rw-r--r--src/gui/preferences.vala325
-rw-r--r--src/gui/preferencesWindow.vala311
-rw-r--r--src/gui/renameWindow.vala109
-rw-r--r--src/gui/settingsWindow.vala174
-rw-r--r--src/gui/sliceTypeList.vala172
-rw-r--r--src/gui/themeList.vala74
-rw-r--r--src/gui/tipViewer.vala172
-rw-r--r--src/gui/triggerSelectButton.vala161
-rw-r--r--src/gui/triggerSelectWindow.vala257
-rw-r--r--src/images/icon.vala12
-rw-r--r--src/images/image.vala67
-rw-r--r--src/images/renderedText.vala75
-rw-r--r--src/images/themedIcon.vala2
-rw-r--r--src/pies/load.vala31
-rw-r--r--src/pies/pie.vala38
-rw-r--r--src/pies/pieManager.vala54
-rw-r--r--src/pies/save.vala8
-rw-r--r--src/renderers/pieRenderer.vala74
-rw-r--r--src/renderers/pieWindow.vala69
-rw-r--r--src/renderers/sliceRenderer.vala23
-rw-r--r--src/themes/theme.vala3
-rw-r--r--src/utilities/animatedValue.vala13
-rw-r--r--src/utilities/bindingManager.vala34
-rw-r--r--src/utilities/config.vala5
-rw-r--r--src/utilities/focusGrabber.vala99
-rw-r--r--src/utilities/key.vala26
-rw-r--r--src/utilities/paths.vala68
-rw-r--r--src/utilities/trigger.vala36
-rw-r--r--vapi/libbamf3.vapi166
-rw-r--r--vapi/libwnck-3.0.deps2
-rw-r--r--vapi/libwnck-3.0.vapi369
-rw-r--r--vapi/unique-3.0.deps8
-rw-r--r--vapi/unique-3.0.vapi94
106 files changed, 10376 insertions, 4838 deletions
diff --git a/.gitignore b/.gitignore
index e654230..b64af18 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,5 @@
*.h
build/*
gnome-pie
-gnome-pie.deb
+Makefile
+.valencia
diff --git a/.valencia b/.valencia
new file mode 100644
index 0000000..a9287ae
--- /dev/null
+++ b/.valencia
@@ -0,0 +1,3 @@
+version = 1
+build_command = ./make.sh
+clean_command = rm -rf build/
diff --git a/AUTHORS b/AUTHORS
index 72aa626..fcb98b2 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -8,3 +8,6 @@ Translations:
Riccardo Traverso <gr3yfox.fw@gmail.com>
Magnun Leno <magnun@codecommunity.org>
Kim Boram <Boramism@gmail.com>
+Eduardo Anabalon <lalo1412@gmail.com>
+Grégoire Bellon-Gervais <greggbg@gmail.com>
+Eugene Roskin <pams@imail.ru>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 41e2c68..c1327bf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,51 +24,78 @@ ensure_vala_version("0.11.0" MINIMUM)
################################################################
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(GTK REQUIRED gtk+-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(INDICATOR appindicator-0.1)
pkg_check_modules(XML REQUIRED libxml-2.0)
pkg_check_modules(XTST REQUIRED xtst)
-pkg_check_modules(UNIQUE REQUIRED unique-1.0)
-pkg_check_modules(BAMF REQUIRED libbamf)
-pkg_check_modules(WNCK REQUIRED libwnck-1.0)
pkg_check_modules(GMENU3 libgnome-menu-3.0)
find_library(M_LIB m)
set(CFLAGS
${GIO_CFLAGS}
- ${GTK_CFLAGS} ${GTK_CFLAGS_OTHER}
+ ${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
+ -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_APPINDICATOR3)
+endif (${INDICATOR3_FOUND})
+
add_definitions(${CFLAGS})
set(LIBS
${GIO_LIBRARIES}
- ${GTK_LIBRARIES}
+ ${GTK2_LIBRARIES}
+ ${GTK3_LIBRARIES}
${CAIRO_LIBRARIES}
${GEE_LIBRARIES}
${INDICATOR_LIBRARIES}
+ ${INDICATOR3_LIBRARIES}
${XML_LIBRARIES}
${XTST_LIBRARIES}
${GMENU_LIBRARIES}
@@ -83,10 +110,12 @@ link_libraries(${LIBS})
set(LIB_PATHS
${GIO_LIBRARY_DIRS}
- ${GTK_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}
@@ -100,10 +129,12 @@ link_directories(${LIB_PATHS})
set(INCLUDE_PATHS
${GIO_INCLUDE_DIRS}
- ${GTK_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}
@@ -122,8 +153,6 @@ include_directories(${INCLUDE_PATHS})
set(EXECUTABLE_OUTPUT_PATH ${gnomepie_SOURCE_DIR})
set(VALA_PKGS
- gtk+-2.0
- gdk-x11-2.0
cairo
gee-1.0
x11
@@ -131,21 +160,36 @@ set(VALA_PKGS
posix
libxml-2.0
xtst
- unique-1.0
- bamf
- libwnck-1.0
)
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)
################################################################
@@ -169,10 +213,12 @@ message( "Summary:" )
message( " EXECUTABLE_OUTPUT_PATH = ${EXECUTABLE_OUTPUT_PATH}" )
message( " VALA_EXECUTABLE = ${VALA_EXECUTABLE}" )
message( "Libs:" )
-message( " GTK_LIBRARIES = ${GTK_LIBRARIES}" )
+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}" )
diff --git a/INSTALL b/INSTALL
index 16788e5..e15f36b 100644
--- a/INSTALL
+++ b/INSTALL
@@ -2,17 +2,26 @@
# Compiling and installing Gnome-Pie #
####################################################################
-First of all, install all dependancies:
+First of all, install all dependancies.
+For compilation and linking against GTK3:
-sudo apt-get install libgtk2.0-dev libcairo2-dev libappindicator-dev
- libgee-dev libxml2-dev libxtst-dev
- libgnome-menu-dev valac cmake libunique-dev
+ 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
+ ./make.sh
Launch it with
-./gnome-pie
+ ./gnome-pie
If you want to install it system wide use
cd build && sudo make install
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c96c817
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,2 @@
+BUILD_ROOT = 1
+PROGRAM=gnome-pie
diff --git a/README b/README
deleted file mode 100644
index 1d71775..0000000
--- a/README
+++ /dev/null
@@ -1,85 +0,0 @@
-####################################################################
-# Gnome-Pie #
-####################################################################
-
-This is an experimantal attempt to create a visual application
-launcher for the Gnome Desktop.
-
-Homepage: http://gnome-pie.simonschneegans.de
-
-It is inspired by the an addon written for the game World of Warcraft.
-(http://go-hero.net/opie/)
-
-####################################################################
-# About this Branch #
-####################################################################
-
-This is the master branch of Gnome-Pie.
-
-####################################################################
-# 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 #
-####################################################################
-
-First of all, install all dependancies:
-
-sudo apt-get install libgtk2.0-dev libcairo2-dev libappindicator-dev
- libgee-dev libxml2-dev libxtst-dev
- libgnome-menu-dev valac cmake libunique-dev
- libbamf-dev libwnck-dev
-
-Then build 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 <ctrl><Alt>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).
-
-####################################################################
-# License #
-####################################################################
-
-Copyright (C) 2011 Simon Schneegans <code@simonschneegans.de>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d9d6698
--- /dev/null
+++ b/README.md
@@ -0,0 +1,83 @@
+Gnome-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 <ctrl><Alt>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 <code@simonschneegans.de>
+
+This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/TRANSLATING b/TRANSLATING
index 5112af7..cf2cce0 100644
--- a/TRANSLATING
+++ b/TRANSLATING
@@ -29,7 +29,7 @@ UPDATING AN EXISTENT TRANSLATION
1. Update the gnomepie.pot file
* navigate with a terminal to the directory "resources/locale"
* enter the command "./gen-pot.sh"
-2. Updste your translation file
+2. Update your translation file
* enter the command "./update-po.sh"
* follow instructions
3. Translate to your language
diff --git a/resources/gnome-pie-indicator.svg b/resources/gnome-pie-indicator.svg
deleted file mode 100644
index bfeb5bd..0000000
--- a/resources/gnome-pie-indicator.svg
+++ /dev/null
@@ -1,770 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- version="1.0"
- width="32"
- height="32"
- id="svg2408"
- inkscape:version="0.48.1 r9760"
- sodipodi:docname="gnome-pie-indicator.svg">
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1117"
- inkscape:window-height="801"
- id="namedview93"
- showgrid="false"
- inkscape:zoom="13.666667"
- inkscape:cx="14.888492"
- inkscape:cy="21.146173"
- inkscape:window-x="575"
- inkscape:window-y="84"
- inkscape:window-maximized="0"
- inkscape:current-layer="svg2408" />
- <defs
- id="defs2410">
- <linearGradient
- id="linearGradient3858">
- <stop
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1"
- id="stop3860" />
- <stop
- offset="1"
- style="stop-color:#aaaaaa;stop-opacity:1"
- id="stop3862" />
- </linearGradient>
- <linearGradient
- id="linearGradient3637">
- <stop
- id="stop3639"
- style="stop-color:#f0f0f0;stop-opacity:1"
- offset="0" />
- <stop
- id="stop3641"
- style="stop-color:#aaaaaa;stop-opacity:1"
- offset="1" />
- </linearGradient>
- <linearGradient
- x1="45.447727"
- y1="92.539597"
- x2="45.447727"
- y2="7.0165396"
- id="ButtonShadow"
- gradientUnits="userSpaceOnUse"
- gradientTransform="scale(1.0058652,0.994169)">
- <stop
- id="stop3750"
- style="stop-color:#000000;stop-opacity:1"
- offset="0" />
- <stop
- id="stop3752"
- style="stop-color:#000000;stop-opacity:0.58823532"
- offset="1" />
- </linearGradient>
- <linearGradient
- id="linearGradient3737">
- <stop
- id="stop3739"
- style="stop-color:#ffffff;stop-opacity:1"
- offset="0" />
- <stop
- id="stop3741"
- style="stop-color:#ffffff;stop-opacity:0"
- offset="1" />
- </linearGradient>
- <linearGradient
- id="linearGradient3700">
- <stop
- id="stop3702"
- style="stop-color:#2276c5;stop-opacity:1"
- offset="0" />
- <stop
- id="stop3704"
- style="stop-color:#68baf4;stop-opacity:1"
- offset="1" />
- </linearGradient>
- <filter
- color-interpolation-filters="sRGB"
- id="filter3174">
- <feGaussianBlur
- id="feGaussianBlur3176"
- stdDeviation="1.71" />
- </filter>
- <linearGradient
- x1="36.357143"
- y1="6"
- x2="36.357143"
- y2="63.893143"
- id="linearGradient3188"
- xlink:href="#linearGradient3737"
- gradientUnits="userSpaceOnUse" />
- <filter
- x="-0.192"
- y="-0.192"
- width="1.3839999"
- height="1.3839999"
- color-interpolation-filters="sRGB"
- id="filter3794">
- <feGaussianBlur
- id="feGaussianBlur3796"
- stdDeviation="5.28" />
- </filter>
- <linearGradient
- x1="48"
- y1="20.220806"
- x2="48"
- y2="138.66119"
- id="linearGradient3613"
- xlink:href="#linearGradient3737"
- gradientUnits="userSpaceOnUse" />
- <radialGradient
- cx="48"
- cy="90.171875"
- r="42"
- fx="48"
- fy="90.171875"
- id="radialGradient3619"
- xlink:href="#linearGradient3737"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1573129,0,0,0.99590774,-7.5510206,0.19713193)" />
- <clipPath
- id="clipPath3613">
- <rect
- width="84"
- height="84"
- rx="6"
- ry="6"
- x="6"
- y="6"
- id="rect3615"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
- </clipPath>
- <linearGradient
- x1="48"
- y1="90"
- x2="48"
- y2="5.9877172"
- id="linearGradient2843"
- xlink:href="#linearGradient3700"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,100)" />
- <clipPath
- id="clipPath3625">
- <path
- d="M 0,0 0,96 96,96 96,0 0,0 z m 12,6 72,0 c 3.324,0 6,2.676 6,6 l 0,72 c 0,3.324 -2.676,6 -6,6 L 12,90 C 8.676,90 6,87.324 6,84 L 6,12 C 6,8.676 8.676,6 12,6 z"
- inkscape:connector-curvature="0"
- id="path3627"
- style="fill:#ffffff;fill-opacity:1;stroke:none" />
- </clipPath>
- <linearGradient
- x1="44.512066"
- y1="6"
- x2="44.512066"
- y2="90.015434"
- id="linearGradient3643"
- xlink:href="#linearGradient3637"
- gradientUnits="userSpaceOnUse" />
- <clipPath
- id="clipPath3649">
- <rect
- width="76"
- height="76"
- rx="4"
- ry="4"
- x="10"
- y="10"
- id="rect3651"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
- </clipPath>
- <filter
- color-interpolation-filters="sRGB"
- id="filter3657">
- <feGaussianBlur
- id="feGaussianBlur3659"
- stdDeviation="1.14" />
- </filter>
- <linearGradient
- x1="45.447727"
- y1="92.539597"
- x2="45.447727"
- y2="7.0165396"
- id="ButtonShadow-0"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0058652,0,0,0.994169,100,0)">
- <stop
- id="stop3750-8"
- style="stop-color:#000000;stop-opacity:1"
- offset="0" />
- <stop
- id="stop3752-5"
- style="stop-color:#000000;stop-opacity:0.58823532"
- offset="1" />
- </linearGradient>
- <linearGradient
- x1="32.251034"
- y1="6.1317081"
- x2="32.251034"
- y2="90.238609"
- id="linearGradient3780"
- xlink:href="#ButtonShadow-0"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0238095,0,0,-1.0119048,-1.1428571,98.071429)" />
- <linearGradient
- x1="32.251034"
- y1="6.1317081"
- x2="32.251034"
- y2="90.238609"
- id="linearGradient3772"
- xlink:href="#ButtonShadow-0"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0238095,0,0,-1.0119048,-1.1428571,98.071429)" />
- <linearGradient
- x1="32.251034"
- y1="6.1317081"
- x2="32.251034"
- y2="90.238609"
- id="linearGradient3725"
- xlink:href="#ButtonShadow-0"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0238095,0,0,-1.0119048,-1.1428571,98.071429)" />
- <linearGradient
- x1="32.251034"
- y1="6.1317081"
- x2="32.251034"
- y2="90.238609"
- id="linearGradient3721"
- xlink:href="#ButtonShadow-0"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,-1,0,97)" />
- <linearGradient
- x1="32.251034"
- y1="6.1317081"
- x2="32.251034"
- y2="90.238609"
- id="linearGradient3199"
- xlink:href="#ButtonShadow-0"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0238095,0,0,-1.0119048,-1.1428571,98.071429)" />
- <linearGradient
- x1="36.357143"
- y1="6"
- x2="36.357143"
- y2="63.893143"
- id="linearGradient3188-8"
- xlink:href="#linearGradient3737-3"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-7.3170732,-6.2926829)" />
- <linearGradient
- id="linearGradient3737-3">
- <stop
- id="stop3739-6"
- style="stop-color:#ffffff;stop-opacity:1"
- offset="0" />
- <stop
- id="stop3741-1"
- style="stop-color:#ffffff;stop-opacity:0"
- offset="1" />
- </linearGradient>
- <radialGradient
- cx="48"
- cy="90.171875"
- r="42"
- fx="48"
- fy="90.171875"
- id="radialGradient3619-3"
- xlink:href="#linearGradient3737-3"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1573129,0,0,0.99590774,-14.868094,-6.095551)" />
- <linearGradient
- x1="104"
- y1="8"
- x2="120"
- y2="8"
- id="linearGradient3905"
- xlink:href="#linearGradient3637"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-104,104)" />
- <linearGradient
- x1="104"
- y1="8"
- x2="120"
- y2="8"
- id="linearGradient3913"
- xlink:href="#linearGradient3183-0"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-144,104)" />
- <linearGradient
- id="linearGradient3183-0">
- <stop
- id="stop3185-9"
- style="stop-color:#c80000;stop-opacity:1"
- offset="0" />
- <stop
- id="stop3187-6"
- style="stop-color:#f3604d;stop-opacity:1"
- offset="1" />
- </linearGradient>
- <linearGradient
- x1="13"
- y1="3"
- x2="13"
- y2="19"
- id="linearGradient3022"
- xlink:href="#linearGradient3637"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(3.25,0,0,3.25,12.25,12.25)" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3183-0"
- id="linearGradient3077"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-144,104)"
- x1="104"
- y1="8"
- x2="120"
- y2="8" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3637"
- id="linearGradient3082"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-104,104)"
- x1="104"
- y1="8"
- x2="120"
- y2="8" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3637"
- id="linearGradient3102"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(5.2543554,0,0,5.2543554,-105.50523,-10.414634)"
- x1="13"
- y1="3"
- x2="13"
- y2="19" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3858"
- id="linearGradient3983"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.4967108,0,0,1.4967108,-2.4094778,0.11280244)"
- x1="13"
- y1="3"
- x2="13"
- y2="19" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3637"
- id="linearGradient4019"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.4967108,0,0,1.4967108,1.4542413,-1.2816271)"
- x1="13"
- y1="3"
- x2="13"
- y2="19" />
- </defs>
- <metadata
- id="metadata2413">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <path
- inkscape:transform-center-y="0.36649443"
- inkscape:transform-center-x="0.19686872"
- sodipodi:nodetypes="ssssssssss"
- inkscape:connector-curvature="0"
- style="opacity:0.1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 7.7360918,10.076705 c -1.0465409,-0.02783 -4.5578473,1.895837 -4.370619,3.201562 1.1292459,7.87531 3.0176472,3.848231 4.0641876,3.876067 1.04654,0.02783 3.0913186,-2.092967 3.1191546,-3.139507 0.02784,-1.04654 -1.7661835,-3.910286 -2.8127232,-3.938122 z m -0.2484806,2.596547 c 0.7365921,0.0196 1.3199737,0.62932 1.3003816,1.365911 -0.019591,0.736592 -0.6347054,1.319831 -1.3712973,1.300239 C 6.6801043,15.319822 6.0968659,14.704697 6.116458,13.968104 6.136051,13.231514 6.7510197,12.65366 7.4876112,12.673252 z"
- id="path3885" />
- <path
- inkscape:transform-center-y="0.44737781"
- inkscape:transform-center-x="-0.49775681"
- id="path3887"
- d="m 7.50964,10.456728 c -1.4846825,-0.0395 -4.0165802,1.677249 -4.0560705,3.161931 -0.03949,1.484683 2.3723168,4.282886 3.8569993,4.322377 1.4846825,0.0395 4.4930972,-2.511286 4.5325872,-3.995968 0.03949,-1.484683 -2.8488334,-3.448851 -4.333516,-3.48834 z m -0.00929,1.585106 c 1.044973,0.02779 1.8725925,0.892788 1.8447974,1.93776 -0.027792,1.044971 -0.900429,1.872388 -1.9454014,1.844592 -1.0449709,-0.02779 -1.872387,-0.900428 -1.8445924,-1.945401 0.027794,-1.044971 0.9002269,-1.864747 1.9451973,-1.836951 z"
- style="opacity:0.15;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ssssssssss" />
- <path
- inkscape:transform-center-y="0.15406876"
- inkscape:transform-center-x="-0.20260573"
- style="opacity:0.3;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 7.4418655,10.570955 c -1.8406283,-0.04896 -3.3742444,1.405189 -3.4232025,3.245817 -0.048958,1.840628 1.4051888,3.374244 3.2458166,3.423202 1.8406287,0.04896 3.3742444,-1.405187 3.4232024,-3.245816 0.04896,-1.840628 -1.405188,-3.374245 -3.2458165,-3.423203 z m 0.04061,0.968013 c 1.2954991,0.03446 2.3215364,1.106832 2.287078,2.40233 C 9.7350962,15.236796 8.6532501,16.262582 7.357752,16.228123 6.0622533,16.193665 5.0364682,15.11182 5.0709264,13.816321 5.1053841,12.520824 6.1869779,11.50451 7.4824762,11.538968 z"
- id="path3889"
- inkscape:connector-curvature="0" />
- <path
- id="path3873"
- d="m 9.5886993,18.492316 c -1.0468884,-0.0069 -4.5189639,1.98674 -4.3056216,3.288454 1.2867453,7.851113 3.0941135,3.787021 4.1410019,3.793891 1.0468874,0.0069 3.0487804,-2.154459 3.0556514,-3.201346 0.0069,-1.046889 -1.844144,-3.874128 -2.8910317,-3.880999 z m -0.1964272,2.601002 c 0.7368369,0.0049 1.3323129,0.602758 1.3274829,1.339588 -0.0049,0.736835 -0.608144,1.332278 -1.344978,1.327444 -0.7368361,-0.0049 -1.3322773,-0.608144 -1.3274445,-1.344978 0.00484,-0.736836 0.6081094,-1.32689 1.3449449,-1.322054 z"
- style="opacity:0.1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ssssssssss"
- inkscape:transform-center-x="0.56656789"
- inkscape:transform-center-y="0.28133852" />
- <path
- sodipodi:nodetypes="ssssssssss"
- inkscape:connector-curvature="0"
- style="opacity:0.15;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 9.3699042,18.876798 c -1.4851755,-0.0098 -3.9821831,1.757355 -3.9919301,3.242531 -0.00975,1.485176 2.4576172,4.234514 3.9427934,4.244261 1.4851765,0.0098 4.4418985,-2.600768 4.4516465,-4.085943 0.0098,-1.485176 -2.917335,-3.391102 -4.4025098,-3.400849 z m 0.022461,1.584973 c 1.0453178,0.0069 1.8900968,0.855105 1.8832348,1.900424 -0.0069,1.045319 -0.862748,1.890046 -1.908069,1.883182 -1.0453184,-0.0069 -1.8900451,-0.862749 -1.8831824,-1.908071 0.00686,-1.045318 0.8626989,-1.882401 1.908017,-1.87554 z"
- id="path3875"
- inkscape:transform-center-x="-0.13191825"
- inkscape:transform-center-y="0.34529215" />
- <path
- inkscape:connector-curvature="0"
- id="path3877"
- d="m 9.3044317,18.99236 c -1.8412404,-0.01209 -3.3454255,1.472486 -3.3575151,3.31372 -0.012088,1.841239 1.4724861,3.345424 3.3137198,3.357514 1.8412396,0.01209 3.3454256,-1.472486 3.3575146,-3.313719 0.01209,-1.841239 -1.472485,-3.345425 -3.3137193,-3.357514 z m 0.059989,0.967006 c 1.2959293,0.0086 2.3432373,1.060112 2.3347343,2.35604 -0.0086,1.295928 -1.06959,2.343175 -2.365522,2.334666 -1.2959294,-0.0086 -2.3431761,-1.069589 -2.3346664,-2.365521 0.0085,-1.29593 1.0695264,-2.3337 2.365455,-2.325195 z"
- style="opacity:0.3;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
- inkscape:transform-center-x="0.16073992"
- inkscape:transform-center-y="0.053082034" />
- <path
- id="path3849"
- d="m 18.889042,18.664314 c -1.037856,0.1374 -4.202218,2.590276 -3.811601,3.850193 2.355951,7.599026 3.586271,3.324715 4.624127,3.187315 1.037854,-0.137402 2.722945,-2.553885 2.585545,-3.591739 -0.137401,-1.037856 -2.360217,-3.583171 -3.398071,-3.445769 z m 0.163726,2.603265 c 0.730481,-0.0967 1.402641,0.413487 1.499349,1.143965 0.0967,0.730479 -0.418829,1.403349 -1.149308,1.500057 -0.730478,0.0967 -1.403347,-0.41883 -1.500054,-1.149309 -0.0967,-0.730479 0.419537,-1.398006 1.150013,-1.494713 z"
- style="opacity:0.1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ssssssssss"
- inkscape:transform-center-x="0.4446968"
- inkscape:transform-center-y="0.58573564" />
- <path
- sodipodi:nodetypes="ssssssssss"
- inkscape:connector-curvature="0"
- style="opacity:0.15;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 18.725294,19.075267 c -1.472361,0.194925 -3.702151,2.28914 -3.507226,3.761501 0.194925,1.47236 3.017484,3.855618 4.489845,3.660693 1.47236,-0.194926 4.041308,-3.187838 3.846382,-4.6602 -0.194924,-1.47236 -3.356641,-2.956918 -4.829001,-2.761994 z m 0.240572,1.566772 c 1.036299,-0.137195 1.989868,0.586597 2.127062,1.622895 0.137195,1.036301 -0.594175,1.990871 -1.630474,2.128066 -1.036299,0.137195 -1.990871,-0.594175 -2.128066,-1.630474 -0.137193,-1.036299 0.59518,-1.983292 1.631478,-2.120487 z"
- id="path3851"
- inkscape:transform-center-x="-0.27111393"
- inkscape:transform-center-y="0.5280789" />
- <path
- inkscape:connector-curvature="0"
- id="path3853"
- d="m 18.676364,19.198747 c -1.825353,0.241657 -3.110704,1.919272 -2.869046,3.744625 0.241656,1.825352 1.919272,3.110703 3.744624,2.869046 1.825354,-0.241658 3.110704,-1.919274 2.869047,-3.744626 -0.241657,-1.825352 -1.919273,-3.110702 -3.744625,-2.869045 z m 0.19262,0.949525 c 1.284746,-0.170088 2.466929,0.727231 2.637015,2.011979 0.170087,1.284746 -0.736626,2.468171 -2.021373,2.638257 -1.284746,0.170087 -2.468172,-0.736626 -2.638258,-2.021372 -0.170087,-1.284747 0.737869,-2.458778 2.022616,-2.628864 z"
- style="opacity:0.3;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
- inkscape:transform-center-x="0.00017342173"
- inkscape:transform-center-y="0.25032941" />
- <path
- inkscape:transform-center-y="0.54608804"
- inkscape:transform-center-x="0.62401103"
- sodipodi:nodetypes="ssssssssss"
- inkscape:connector-curvature="0"
- style="opacity:0.1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 24.868484,8.2343126 c -1.044562,0.070097 -4.360716,2.3135084 -4.052276,3.5960204 1.860318,7.735304 3.364089,3.549363 4.408651,3.479269 1.044562,-0.0701 2.882184,-2.372716 2.812089,-3.417277 -0.0701,-1.044561 -2.123903,-3.7281053 -3.168464,-3.6580124 z m -0.0048,2.6084054 c 0.735198,-0.04933 1.373011,0.503203 1.422345,1.238402 0.04933,0.735197 -0.508577,1.373371 -1.243777,1.422705 -0.735166,0.04933 -1.373339,-0.508578 -1.422674,-1.243777 -0.04933,-0.735199 0.508939,-1.367995 1.244138,-1.41733 z"
- id="path3861" />
- <path
- inkscape:transform-center-y="0.54641798"
- inkscape:transform-center-x="-0.085724368"
- id="path3863"
- d="m 24.678541,8.6338352 c -1.481876,0.099434 -3.842248,2.0452918 -3.74281,3.5271678 0.09943,1.481875 2.762206,4.042426 4.244081,3.942988 1.481876,-0.09943 4.238731,-2.920212 4.139292,-4.402086 -0.09943,-1.481877 -3.158689,-3.167508 -4.640563,-3.0680698 z m 0.138894,1.5790368 c 1.042995,-0.06999 1.947833,0.713872 2.017822,1.756867 0.06999,1.042995 -0.721498,1.948344 -1.764494,2.018334 -1.042995,0.06999 -1.948344,-0.721499 -2.018333,-1.764494 -0.06999,-1.042996 0.72201,-1.940719 1.765005,-2.010707 z"
- style="opacity:0.15;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ssssssssss" />
- <path
- inkscape:transform-center-y="0.26029952"
- inkscape:transform-center-x="0.196409"
- style="opacity:0.3;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 24.621738,8.7538978 c -1.837147,0.1232842 -3.228149,1.7143892 -3.10487,3.5515372 0.123284,1.837149 1.714389,3.22815 3.551537,3.104871 1.837148,-0.123284 3.228149,-1.71439 3.104871,-3.551538 -0.123285,-1.837148 -1.71439,-3.228149 -3.551538,-3.1048702 z m 0.130904,0.9599816 c 1.293048,-0.086762 2.414817,0.8850186 2.501585,2.1780666 0.08676,1.293049 -0.894474,2.415452 -2.187522,2.50222 -1.293049,0.08676 -2.415453,-0.894474 -2.50222,-2.187522 -0.08676,-1.293049 0.895108,-2.405997 2.188157,-2.4927646 z"
- id="path3865"
- inkscape:connector-curvature="0" />
- <path
- sodipodi:nodetypes="ssssssssss"
- inkscape:connector-curvature="0"
- style="opacity:0.1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 14.029843,5.4909841 c -1.046911,0 -4.5058277,2.016355 -4.2839472,3.3166402 1.3382432,7.8424997 3.1189012,3.7666337 4.1658122,3.7666337 1.04691,0 3.034575,-2.174423 3.034575,-3.2213323 0,-1.0469108 -1.869531,-3.8619416 -2.91644,-3.8619416 z M 13.850489,8.093221 c 0.736853,0 1.336241,0.5939985 1.336241,1.3308516 0,0.7368514 -0.599388,1.3362394 -1.336241,1.3362394 -0.736851,0 -1.336239,-0.599388 -1.336239,-1.3362394 0,-0.7368531 0.599388,-1.3308516 1.336239,-1.3308516 z"
- id="path3077" />
- <path
- id="path3075"
- d="m 13.813576,5.8768934 c -1.485209,0 -3.9705641,1.7834529 -3.9705641,3.2686617 0,1.4852079 2.4853551,4.2182919 3.9705641,4.2182919 1.485207,0 4.158787,-2.851487 4.158787,-4.3366948 0,-1.4852088 -2.67358,-3.1502588 -4.158787,-3.1502588 z m 0.03286,1.5847924 c 1.045341,0 1.895668,0.8426816 1.895668,1.8880223 0,1.0453419 -0.850327,1.8956679 -1.895668,1.8956679 -1.045341,0 -1.895666,-0.850326 -1.895666,-1.8956679 0,-1.0453407 0.850325,-1.8880223 1.895666,-1.8880223 z"
- style="opacity:0.15;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ssssssssss" />
- <path
- style="opacity:0.3;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 13.748863,5.9928827 c -1.84128,0 -3.335689,1.4944093 -3.335689,3.3356891 0,1.8412782 1.494409,3.3356892 3.335689,3.3356892 1.841278,0 3.335689,-1.494411 3.335689,-3.3356892 0,-1.8412798 -1.494411,-3.3356891 -3.335689,-3.3356891 z m 0.06634,0.966592 c 1.295956,0 2.350144,1.0447105 2.350144,2.3406671 0,1.2959582 -1.054188,2.3501442 -2.350144,2.3501442 -1.295958,0 -2.350145,-1.054186 -2.350145,-2.3501442 0,-1.2959566 1.054187,-2.3406671 2.350145,-2.3406671 z"
- id="path3065"
- inkscape:connector-curvature="0" />
- <g
- id="layer2"
- style="display:none"
- transform="translate(0,-64)">
- <rect
- width="86"
- height="85"
- rx="6"
- ry="6"
- x="5"
- y="7"
- clip-path="url(#clipPath3625)"
- id="rect3745"
- style="opacity:0.9;fill:url(#ButtonShadow);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter3174)" />
- </g>
- <g
- id="layer1"
- style="display:none"
- transform="translate(0,-64)">
- <rect
- width="84"
- height="84"
- rx="6"
- ry="6"
- x="6"
- y="6"
- id="rect2419"
- style="opacity:0.8;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
- <path
- d="m 14,10 c -2.216,0 -4,1.784 -4,4 l 0,68 c 0,2.216 1.784,4 4,4 l 68,0 c 2.216,0 4,-1.784 4,-4 l 0,-68 c 0,-2.216 -1.784,-4 -4,-4 l -68,0 z m 0,3.0625 68,0 c 0.578769,0 0.9375,0.358731 0.9375,0.9375 l 0,68 c 0,0.578769 -0.358731,0.9375 -0.9375,0.9375 l -68,0 c -0.578769,0 -0.9375,-0.358731 -0.9375,-0.9375 l 0,-68 c 0,-0.578769 0.358731,-0.9375 0.9375,-0.9375 z"
- inkscape:connector-curvature="0"
- id="rect3726"
- style="opacity:0.07999998;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
- <path
- d="M 12,6 C 8.676,6 6,8.676 6,12 l 0,72 c 0,3.324 2.676,6 6,6 l 72,0 c 3.324,0 6,-2.676 6,-6 L 90,12 C 90,8.676 87.324,6 84,6 L 12,6 z m 2,4 68,0 c 2.216,0 4,1.784 4,4 l 0,68 c 0,2.216 -1.784,4 -4,4 l -68,0 c -2.216,0 -4,-1.784 -4,-4 l 0,-68 c 0,-2.216 1.784,-4 4,-4 z"
- inkscape:connector-curvature="0"
- id="rect3629"
- style="fill:url(#linearGradient3643);fill-opacity:1;fill-rule:nonzero;stroke:none" />
- <path
- d="M 12,6 C 8.676,6 6,8.676 6,12 l 0,2 0,68 0,2 c 0,0.334721 0.04135,0.6507 0.09375,0.96875 0.0487,0.295596 0.09704,0.596915 0.1875,0.875 0.00988,0.03038 0.020892,0.0636 0.03125,0.09375 0.098865,0.287771 0.2348802,0.547452 0.375,0.8125 0.1445918,0.273507 0.3156161,0.535615 0.5,0.78125 0.1843839,0.245635 0.3737765,0.473472 0.59375,0.6875 0.439947,0.428056 0.94291,0.814526 1.5,1.09375 0.278545,0.139612 0.5734731,0.246947 0.875,0.34375 -0.2562018,-0.100222 -0.4867109,-0.236272 -0.71875,-0.375 -0.00741,-0.0044 -0.023866,0.0045 -0.03125,0 -0.031933,-0.0193 -0.062293,-0.04251 -0.09375,-0.0625 -0.120395,-0.0767 -0.2310226,-0.163513 -0.34375,-0.25 -0.1061728,-0.0808 -0.2132809,-0.161112 -0.3125,-0.25 C 8.4783201,88.557317 8.3087904,88.373362 8.15625,88.1875 8.0486711,88.057245 7.9378561,87.922215 7.84375,87.78125 7.818661,87.74287 7.805304,87.69538 7.78125,87.65625 7.716487,87.553218 7.6510225,87.451733 7.59375,87.34375 7.4927417,87.149044 7.3880752,86.928049 7.3125,86.71875 7.30454,86.69694 7.288911,86.6782 7.28125,86.65625 7.2494249,86.5643 7.2454455,86.469419 7.21875,86.375 7.1884177,86.268382 7.1483606,86.171969 7.125,86.0625 7.0521214,85.720988 7,85.364295 7,85 L 7,83 7,15 7,13 C 7,10.218152 9.2181517,8 12,8 l 2,0 68,0 2,0 c 2.781848,0 5,2.218152 5,5 l 0,2 0,68 0,2 c 0,0.364295 -0.05212,0.720988 -0.125,1.0625 -0.04415,0.206893 -0.08838,0.397658 -0.15625,0.59375 -0.0077,0.02195 -0.0233,0.04069 -0.03125,0.0625 -0.06274,0.173739 -0.138383,0.367449 -0.21875,0.53125 -0.04158,0.0828 -0.07904,0.169954 -0.125,0.25 -0.0546,0.09721 -0.126774,0.18835 -0.1875,0.28125 -0.09411,0.140965 -0.204921,0.275995 -0.3125,0.40625 -0.143174,0.17445 -0.303141,0.346998 -0.46875,0.5 -0.01117,0.0102 -0.01998,0.02115 -0.03125,0.03125 -0.138386,0.125556 -0.285091,0.234436 -0.4375,0.34375 -0.102571,0.07315 -0.204318,0.153364 -0.3125,0.21875 -0.0074,0.0045 -0.02384,-0.0044 -0.03125,0 -0.232039,0.138728 -0.462548,0.274778 -0.71875,0.375 0.301527,-0.0968 0.596455,-0.204138 0.875,-0.34375 0.55709,-0.279224 1.060053,-0.665694 1.5,-1.09375 0.219973,-0.214028 0.409366,-0.441865 0.59375,-0.6875 0.184384,-0.245635 0.355408,-0.507743 0.5,-0.78125 0.14012,-0.265048 0.276135,-0.524729 0.375,-0.8125 0.01041,-0.03078 0.02133,-0.06274 0.03125,-0.09375 0.09046,-0.278085 0.1388,-0.579404 0.1875,-0.875 C 89.95865,84.6507 90,84.334721 90,84 l 0,-2 0,-68 0,-2 C 90,8.676 87.324,6 84,6 L 12,6 z"
- inkscape:connector-curvature="0"
- id="rect3728"
- style="fill:url(#linearGradient3188);fill-opacity:1;fill-rule:nonzero;stroke:none" />
- <path
- d="M 12,90 C 8.676,90 6,87.324 6,84 L 6,82 6,14 6,12 c 0,-0.334721 0.04135,-0.6507 0.09375,-0.96875 0.0487,-0.295596 0.09704,-0.596915 0.1875,-0.875 C 6.29113,10.12587 6.302142,10.09265 6.3125,10.0625 6.411365,9.774729 6.5473802,9.515048 6.6875,9.25 6.8320918,8.976493 7.0031161,8.714385 7.1875,8.46875 7.3718839,8.223115 7.5612765,7.995278 7.78125,7.78125 8.221197,7.353194 8.72416,6.966724 9.28125,6.6875 9.559795,6.547888 9.8547231,6.440553 10.15625,6.34375 9.9000482,6.443972 9.6695391,6.580022 9.4375,6.71875 c -0.00741,0.0044 -0.023866,-0.0045 -0.03125,0 -0.031933,0.0193 -0.062293,0.04251 -0.09375,0.0625 -0.120395,0.0767 -0.2310226,0.163513 -0.34375,0.25 -0.1061728,0.0808 -0.2132809,0.161112 -0.3125,0.25 C 8.4783201,7.442683 8.3087904,7.626638 8.15625,7.8125 8.0486711,7.942755 7.9378561,8.077785 7.84375,8.21875 7.818661,8.25713 7.805304,8.30462 7.78125,8.34375 7.716487,8.446782 7.6510225,8.548267 7.59375,8.65625 7.4927417,8.850956 7.3880752,9.071951 7.3125,9.28125 7.30454,9.30306 7.288911,9.3218 7.28125,9.34375 7.2494249,9.4357 7.2454455,9.530581 7.21875,9.625 7.1884177,9.731618 7.1483606,9.828031 7.125,9.9375 7.0521214,10.279012 7,10.635705 7,11 l 0,2 0,68 0,2 c 0,2.781848 2.2181517,5 5,5 l 2,0 68,0 2,0 c 2.781848,0 5,-2.218152 5,-5 l 0,-2 0,-68 0,-2 C 89,10.635705 88.94788,10.279012 88.875,9.9375 88.83085,9.730607 88.78662,9.539842 88.71875,9.34375 88.71105,9.3218 88.69545,9.30306 88.6875,9.28125 88.62476,9.107511 88.549117,8.913801 88.46875,8.75 88.42717,8.6672 88.38971,8.580046 88.34375,8.5 88.28915,8.40279 88.216976,8.31165 88.15625,8.21875 88.06214,8.077785 87.951329,7.942755 87.84375,7.8125 87.700576,7.63805 87.540609,7.465502 87.375,7.3125 87.36383,7.3023 87.35502,7.29135 87.34375,7.28125 87.205364,7.155694 87.058659,7.046814 86.90625,6.9375 86.803679,6.86435 86.701932,6.784136 86.59375,6.71875 c -0.0074,-0.0045 -0.02384,0.0044 -0.03125,0 -0.232039,-0.138728 -0.462548,-0.274778 -0.71875,-0.375 0.301527,0.0968 0.596455,0.204138 0.875,0.34375 0.55709,0.279224 1.060053,0.665694 1.5,1.09375 0.219973,0.214028 0.409366,0.441865 0.59375,0.6875 0.184384,0.245635 0.355408,0.507743 0.5,0.78125 0.14012,0.265048 0.276135,0.524729 0.375,0.8125 0.01041,0.03078 0.02133,0.06274 0.03125,0.09375 0.09046,0.278085 0.1388,0.579404 0.1875,0.875 C 89.95865,11.3493 90,11.665279 90,12 l 0,2 0,68 0,2 c 0,3.324 -2.676,6 -6,6 l -72,0 z"
- inkscape:connector-curvature="0"
- id="path3615"
- style="opacity:0.6;fill:url(#radialGradient3619);fill-opacity:1;fill-rule:nonzero;stroke:none" />
- <rect
- width="84"
- height="84"
- rx="6"
- ry="6"
- x="6"
- y="106"
- id="rect2841"
- style="fill:url(#linearGradient2843);fill-opacity:1;fill-rule:nonzero;stroke:none" />
- <rect
- width="76"
- height="76"
- rx="4"
- ry="4"
- x="10"
- y="110"
- id="rect3634"
- style="fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
- <path
- d="m 14,9 c -2.752703,0 -5,2.247297 -5,5 l 0,68 c 0,2.752703 2.247297,5 5,5 l 68,0 c 2.752703,0 5,-2.247297 5,-5 L 87,14 C 87,11.247297 84.752703,9 82,9 L 14,9 z m 0,2 68,0 c 1.679297,0 3,1.320703 3,3 l 0,68 c 0,1.679297 -1.320703,3 -3,3 l -68,0 c -1.679297,0 -3,-1.320703 -3,-3 l 0,-68 c 0,-1.679297 1.320703,-3 3,-3 z"
- inkscape:connector-curvature="0"
- transform="translate(-110,0)"
- clip-path="url(#clipPath3649)"
- id="rect3647"
- style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter3657);enable-background:accumulate;font-family:Abandoned Bitplane;-inkscape-font-specification:Abandoned Bitplane" />
- <path
- d="m 14.089286,10 c -2.216,0 -4,1.784 -4,4 l 0,68 c 0,2.216 1.784,4 4,4 l 68,0 c 2.216,0 4,-1.784 4,-4 l 0,-68 c 0,-2.216 -1.784,-4 -4,-4 l -68,0 z m 0,2 68,0 c 1.140301,0 2,0.859699 2,2 l 0,68 c 0,1.140301 -0.859699,2 -2,2 l -68,0 c -1.140301,0 -2,-0.859699 -2,-2 l 0,-68 c 0,-1.140301 0.859699,-2 2,-2 z"
- inkscape:connector-curvature="0"
- id="path3709"
- style="opacity:0.16000001;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
- <path
- d="m 14,10 c -2.216,0 -4,1.784 -4,4 l 0,68 c 0,2.216 1.784,4 4,4 l 68,0 c 2.216,0 4,-1.784 4,-4 l 0,-68 c 0,-2.216 -1.784,-4 -4,-4 l -68,0 z m 0,1 68,0 c 1.673848,0 3,1.326152 3,3 l 0,68 c 0,1.673848 -1.326152,3 -3,3 l -68,0 c -1.673848,0 -3,-1.326152 -3,-3 l 0,-68 c 0,-1.673848 1.326152,-3 3,-3 z"
- inkscape:connector-curvature="0"
- id="path3707"
- style="opacity:0.36000001;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
- </g>
- <g
- id="layer5"
- style="display:none"
- transform="translate(0,-64)">
- <rect
- width="66"
- height="66"
- rx="12"
- ry="12"
- x="15"
- y="15"
- clip-path="url(#clipPath3613)"
- id="rect3171"
- style="opacity:0.1;fill:url(#linearGradient3613);fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;filter:url(#filter3794)" />
- </g>
- <path
- style="opacity:0.1;fill:#000000;fill-opacity:1;stroke:none;display:inline"
- d="m 23.397052,4.7958958 -1.187267,1.8882981 c 1.316951,0.6107865 4.230976,1.9166511 5.402368,4.2338811 0.657198,1.300058 0.04794,3.317313 0.04794,4.737899 0,0.932918 -0.647251,3.122641 -0.647251,3.122641 0,0 1.828583,0.135671 2.392219,0.208367 0.794448,0.03519 1.167317,-0.156493 1.270971,-0.741323 0.08399,-0.939569 0.137141,-1.748123 0.144748,-2.603153 0.03993,-4.488938 -2.773058,-8.6996204 -6.325173,-11.0411282 -0.385787,-0.2726949 -0.862833,-0.1544034 -1.098552,0.194518 z"
- id="path3999"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccsscccscc" />
- <path
- style="opacity:0.1;fill:#000000;fill-opacity:1;stroke:none;display:inline"
- d="M 22.958481,7.1064202 C 21.018009,5.9359454 16.47899,4.1359021 14.056025,4.1359021 c -7.1032893,0 -12.9010336,5.797743 -12.9010336,12.9010339 0,7.10329 5.7977443,12.901033 12.9010336,12.901033 6.234948,0 12.101435,-6.559764 13.286228,-12.455126 -1.205926,-0.366255 -8.045057,-1.714877 -8.469378,-2.443175 -0.371038,-0.62055 4.383423,-7.7589277 4.085606,-7.9332464 z m 0.935323,12.0758788 c -1.207028,4.813644 -4.706496,8.408307 -9.89457,8.408307 -0.02985,0 -0.05539,2.35e-4 -0.08519,0 -0.0298,2.35e-4 -0.06479,0 -0.09465,0 -6.1209915,0 -11.0837208,-4.953264 -11.0837208,-11.074255 0,-6.12099 4.9627293,-11.0837195 11.0837208,-11.0837195 0.02985,0 0.06485,-2.363e-4 0.09465,0 0.02981,-2.363e-4 0.05533,0 0.08519,0 2.168345,0 3.381177,1.2891357 4.446785,1.5675255 l -5.85294,10.279757 z"
- id="path3923"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="csssccccscssscsccc" />
- <path
- style="opacity:0.35;fill:#000000;fill-opacity:1;stroke:none;display:inline"
- d="M 20.416623,6.3791493 C 18.54855,5.2606951 16.387684,4.5713004 14.056025,4.5713004 c -6.8729409,0 -12.4656355,5.5926936 -12.4656355,12.4656356 0,6.872941 5.5926946,12.465635 12.4656355,12.465635 6.030193,0 10.563977,-4.32965 11.709806,-10.026852 l -1.052019,-0.271258 c -1.207028,4.813643 -5.526504,8.386145 -10.714578,8.386145 -6.120991,0 -11.08372,-4.953264 -11.08372,-11.074255 0,-6.12099 4.962729,-11.0837195 11.08372,-11.0837195 1.891369,0 4.189184,0.5241053 5.928132,1.3982729 0.07121,0.035789 -7.59274,10.1167446 -7.59274,10.1167446 l 1.514486,0.358997 c 0,0 6.829048,-9.7863279 6.981648,-9.9750518 0.144113,-0.4278928 -0.0811,-0.7112672 -0.414137,-0.9524449 z"
- id="path3989"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="csssccsssscccc" />
- <path
- style="opacity:0.35;fill:#000000;fill-opacity:1;stroke:none;display:inline"
- d="m 24.280341,4.9847188 -0.459529,0.7291303 c 3.114065,1.9618503 5.12586,5.4554279 5.12586,9.4080719 0,0.932918 -4.351964,0.271079 -3.785454,1.011296 L 20.429503,12.338806 24.83496,5.598668 C 24.483575,5.4553815 24.233831,4.3191687 23.567031,5.3210632 L 16.100252,16.30836 28.946227,18.608589 c 0.627721,0.06835 1.111696,-0.156879 1.193058,-0.505138 0.160133,-0.796209 0.236629,-1.618197 0.236629,-2.460945 0,-4.54128 -2.457204,-8.4794201 -6.095573,-10.6577872 z"
- id="path3919"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccscccccccsc" />
- <path
- style="opacity:0.45;fill:#000000;fill-opacity:1;stroke:none;display:inline"
- d="M 20.225241,6.6919614 C 18.435255,5.6259801 16.289494,5.0634892 14.056025,5.0634892 c -6.6094748,0 -11.9734464,5.3639718 -11.9734464,11.9734468 0,6.609475 5.3639716,11.973446 11.9734464,11.973446 5.799323,0 10.628006,-4.130176 11.727351,-9.607152 l -1.13582,-0.208235 c -1.247018,4.755417 -5.529967,8.282028 -10.676718,8.282028 -6.1209903,0 -11.0837195,-4.962729 -11.0837195,-11.083719 0,-6.120991 4.9627292,-11.0837204 11.0837195,-11.0837204 2.203136,0 4.202774,0.6284983 5.928202,1.7367442 0.04152,0.030478 -7.853058,10.1011992 -7.853058,10.1011992 l 1.298577,0.204818 c 0,0 6.940561,-10.0934568 6.955136,-10.1137253 0.121193,-0.1685314 0.08888,-0.4540396 -0.07446,-0.5466583 z"
- id="path4002"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="csssccssscccsc" />
- <path
- style="opacity:0.45;fill:#000000;fill-opacity:1;stroke:none;display:inline"
- d="m 24.005851,5.3917211 -0.19877,0.293421 c 3.068343,1.9708036 5.111195,5.3958779 5.111195,9.3137319 0,0.97424 -10.835321,-0.451046 -11.071373,0.449118 l -0.792479,0.640281 12.156547,2.210083 c 0.252619,0.01637 0.381726,-0.09727 0.436123,-0.289557 0.153577,-0.76512 0.246096,-1.556142 0.246095,-2.366293 0,-4.376005 -2.380247,-8.1622223 -5.887338,-10.2507849 z"
- id="path3913"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccsccccsc" />
- <path
- style="fill:url(#linearGradient3983);fill-opacity:1;stroke:none;display:inline"
- d="m 14.056025,4.5996963 c -6.6094748,0 -11.9734464,5.3639705 -11.9734464,11.9734457 0,6.609477 5.3639716,11.973446 11.9734464,11.973446 5.63699,0 10.334306,-3.914092 11.604305,-9.162289 L 13.175763,17.065332 20.378761,6.4454052 C 18.539507,5.2938977 16.384779,4.5996963 14.056025,4.5996963 z m -0.331281,1.8835702 c 1.493619,0 2.70704,1.2039546 2.70704,2.6975747 0,1.4936188 -1.071444,2.6313178 -2.565063,2.6313178 -1.49362,0 -2.849017,-1.137699 -2.849017,-2.6313178 0,-1.4936201 1.21342,-2.697576 2.70704,-2.697576 z M 7.2600291,10.969759 c 0.4359735,-0.01019 0.8814994,0.08971 1.2967288,0.302886 1.3287348,0.682175 1.8558581,2.305892 1.1736818,3.634627 C 9.0482644,16.236006 7.4150818,16.753664 6.0863474,16.071488 4.757613,15.389313 4.2304904,13.765596 4.9126656,12.436861 5.3816612,11.523357 6.300888,10.99213 7.2600291,10.969759 z m 2.0255476,8.651169 c 0.6921258,3.66e-4 1.3841703,0.257257 1.9119663,0.78561 1.055588,1.056708 1.056707,2.768342 0,3.823931 -1.056708,1.055589 -2.7683428,1.056706 -3.8239318,0 -1.0555888,-1.056709 -1.0567075,-2.768342 0,-3.823931 0.528354,-0.527794 1.2198398,-0.785976 1.9119655,-0.78561 z m 9.6828743,0.10412 c 0.867672,-0.02936 1.742128,0.361474 2.290572,1.116891 0.877509,1.208668 0.602896,2.899096 -0.605771,3.776606 -1.208668,0.877509 -2.899096,0.602896 -3.776606,-0.605771 -0.877509,-1.208667 -0.61236,-2.889631 0.596308,-3.767141 0.453249,-0.329066 0.974893,-0.50297 1.495497,-0.520585 z"
- id="path3971"
- inkscape:connector-curvature="0" />
- <path
- style="fill:url(#linearGradient4019);fill-opacity:1;stroke:none;display:inline"
- d="M 24.24248,5.0509761 17.039481,15.670902 29.524048,17.98987 c 0.219097,-0.90541 0.369142,-1.838673 0.369141,-2.811157 0,-4.280721 -2.269787,-8.011035 -5.650709,-10.1277369 z m 0.643631,4.1836066 c 1.053846,0.01236 2.055676,0.6480115 2.479876,1.6848013 0.565601,1.382387 -0.09418,2.955444 -1.476566,3.521046 -1.382388,0.565599 -2.96491,-0.09418 -3.530511,-1.476568 -0.565602,-1.382388 0.09418,-2.9649104 1.476567,-3.5305102 0.345597,-0.1414013 0.699353,-0.2029062 1.050634,-0.1987691 z"
- id="path2505"
- inkscape:connector-curvature="0" />
- <path
- style="opacity:0.15;fill:#000000;fill-opacity:1;stroke:none;display:inline"
- d="m 25.537282,19.355905 c -1.419799,5.028896 -6.00014,8.736355 -11.481257,8.736355 -6.5326617,0 -11.8507636,-5.242776 -11.9734464,-11.746282 -0.00143,0.07647 0,0.150351 0,0.227164 0,6.609475 5.3639716,11.973446 11.9734464,11.973446 5.637551,0 10.334648,-3.913084 11.604305,-9.162289 l -0.123054,-0.0284 z"
- id="path4013"
- inkscape:connector-curvature="0" />
- <path
- style="opacity:0.15;fill:#000000;fill-opacity:1;stroke:none;display:inline"
- d="m 29.475439,17.636297 0.123053,0.0284 c 0.218891,-0.904972 0.28687,-1.874492 0.28687,-2.846416 0,-0.07682 -0.03383,-0.166365 -0.03526,-0.242835 -0.01975,1.046851 -0.102273,2.096069 -0.374656,3.060856 z"
- id="path3904"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccscc" />
- <path
- style="opacity:0.75;fill:#ffffff;fill-opacity:1;stroke:none;display:inline"
- d="M 20.378761,6.4454052 C 18.539342,5.2937334 16.384779,4.5996963 14.056025,4.5996963 c -6.6094748,0 -11.9734464,5.3639705 -11.9734464,11.9734457 0,0.07681 -0.00143,0.160159 0,0.23663 C 2.2052612,10.306266 7.5233633,5.0634892 14.056025,5.0634892 c 2.235014,0 4.304278,0.6457475 6.095573,1.713197 l 0.227163,-0.331281 z"
- id="path4010"
- inkscape:connector-curvature="0" />
- <path
- style="opacity:0.75;fill:#ffffff;fill-opacity:1;stroke:none;display:inline"
- d="m 24.24248,5.0509761 -0.227164,0.331281 c 3.444431,2.0525688 5.797164,5.7546189 5.877873,10.0330849 0.0015,-0.07647 0,-0.159816 0,-0.236629 0,-4.280722 -2.269484,-8.0107322 -5.650709,-10.1277369 z"
- id="path3888"
- inkscape:connector-curvature="0" />
- <path
- style="opacity:0.75;fill:#ffffff;fill-opacity:1;stroke:none;display:inline"
- id="path3890"
- inkscape:connector-curvature="0"
- d="m 13.736282,12.139839 c -1.50143,0 -2.734087,-1.102416 -2.730402,-3.034897 3.3e-5,-0.017983 -3.32e-4,-0.03602 0,-0.053934 0.02787,1.5234153 1.230788,2.7850673 2.714769,2.7850673 1.48398,0 2.730483,-1.103647 2.725191,-2.7850673 3.31e-4,0.017915 -3.5e-5,0.035938 0,0.053934 0.0037,1.892978 -1.20813,3.034897 -2.709558,3.034897 z"
- sodipodi:nodetypes="sscscss" />
- <path
- sodipodi:nodetypes="sscscss"
- d="m 13.725859,6.2796975 c 1.50143,0 2.723665,1.175367 2.719981,3.1078475 -3.5e-5,0.017983 3.31e-4,0.03602 0,0.053934 -0.02787,-1.5234151 -1.23079,-2.7538044 -2.714771,-2.7538044 -1.483978,0 -2.730481,1.0723826 -2.725189,2.7538044 -3.33e-4,-0.017915 3.5e-5,-0.035938 0,-0.053934 -0.0037,-1.8929785 1.218551,-3.1078475 2.719979,-3.1078475 z"
- inkscape:connector-curvature="0"
- id="path3892"
- style="opacity:0.15;fill:#000000;fill-opacity:1;stroke:none;display:inline" />
- <path
- sodipodi:nodetypes="sscscss"
- d="m 19.470644,25.294184 c -1.488442,0.197053 -2.855123,-0.734049 -3.105097,-2.650297 -0.0023,-0.01783 -0.005,-0.03567 -0.0071,-0.05347 0.227566,1.50658 1.585669,2.599443 3.056812,2.40468 1.471143,-0.194764 2.562016,-1.452462 2.336094,-3.118643 0.0027,0.01771 0.0046,0.03564 0.0071,0.05347 0.252095,1.876121 -0.799366,3.167206 -2.287807,3.36426 z"
- inkscape:connector-curvature="0"
- id="path3855"
- style="opacity:0.75;fill:#ffffff;fill-opacity:1;stroke:none;display:inline"
- inkscape:transform-center-x="0.03718261"
- inkscape:transform-center-y="1.3430212" />
- <path
- style="opacity:0.15;fill:#000000;fill-opacity:1;stroke:none;display:inline"
- id="path3857"
- inkscape:connector-curvature="0"
- d="m 18.691202,19.486101 c 1.488441,-0.197054 2.854364,0.807735 3.104339,2.723982 0.0023,0.01783 0.005,0.03567 0.0071,0.05347 -0.227566,-1.506581 -1.581564,-2.568449 -3.052709,-2.373685 -1.471143,0.194762 -2.566119,1.421465 -2.340197,3.087648 -0.0027,-0.01771 -0.0046,-0.03564 -0.0071,-0.05347 -0.252094,-1.876121 0.800123,-3.240891 2.288565,-3.437945 z"
- sodipodi:nodetypes="sscscss"
- inkscape:transform-center-x="0.030372304"
- inkscape:transform-center-y="-1.0356419" />
- <path
- inkscape:transform-center-y="1.4378439"
- inkscape:transform-center-x="0.23106924"
- style="opacity:0.75;fill:#ffffff;fill-opacity:1;stroke:none;display:inline"
- id="path3867"
- inkscape:connector-curvature="0"
- d="m 25.02074,14.887904 c -1.498058,0.10052 -2.801761,-0.916889 -2.927469,-2.84528 -0.0012,-0.01796 -0.0027,-0.03592 -0.0037,-0.05381 0.129804,1.518132 1.414496,2.696414 2.895146,2.597058 1.480651,-0.09935 2.650464,-1.283984 2.532609,-2.961278 0.0015,0.01785 0.0023,0.03587 0.0037,0.05381 0.130415,1.888486 -1.002225,3.108975 -2.500285,3.2095 z"
- sodipodi:nodetypes="sscscss" />
- <path
- inkscape:transform-center-y="-1.1149883"
- inkscape:transform-center-x="0.21865458"
- sodipodi:nodetypes="sscscss"
- d="m 24.617989,9.041609 c 1.49806,-0.1005207 2.796249,0.990373 2.921956,2.918764 0.0012,0.01795 0.0027,0.03592 0.0037,0.05381 -0.129804,-1.518131 -1.412402,-2.6652198 -2.893053,-2.5658631 -1.480649,0.099353 -2.652557,1.2527891 -2.534702,2.9300831 -0.0015,-0.01785 -0.0023,-0.03587 -0.0037,-0.05381 -0.130414,-1.888484 1.007738,-3.1824592 2.505798,-3.2829827 z"
- inkscape:connector-curvature="0"
- id="path3869"
- style="opacity:0.15;fill:#000000;fill-opacity:1;stroke:none;display:inline" />
- <path
- sodipodi:nodetypes="sscscss"
- d="m 9.2515079,25.139101 c -1.5013962,-0.0099 -2.726792,-1.120336 -2.7104247,-3.052752 1.55e-4,-0.01798 -1.058e-4,-0.03602 3.318e-4,-0.05393 0.017869,1.523564 1.2124844,2.793085 2.6964323,2.802825 1.4839477,0.0098 2.7376667,-1.085703 2.7434107,-2.767122 2.27e-4,0.01792 -2.72e-4,0.03594 -3.33e-4,0.05393 -0.0087,1.892963 -1.228021,3.026903 -2.7294174,3.017049 z"
- inkscape:connector-curvature="0"
- id="path3879"
- style="opacity:0.75;fill:#ffffff;fill-opacity:1;stroke:none;display:inline"
- inkscape:transform-center-x="0.18215477"
- inkscape:transform-center-y="1.3108968" />
- <path
- style="opacity:0.15;fill:#000000;fill-opacity:1;stroke:none;display:inline"
- id="path3881"
- inkscape:connector-curvature="0"
- d="m 9.279546,19.279018 c 1.501397,0.0098 2.715891,1.193217 2.699525,3.125631 -1.55e-4,0.01798 1.06e-4,0.03602 -3.31e-4,0.05393 -0.01787,-1.523562 -1.212689,-2.761819 -2.6966388,-2.771559 -1.4839477,-0.0098 -2.7374615,1.054439 -2.7432059,2.735858 -2.253e-4,-0.01791 2.711e-4,-0.03594 3.318e-4,-0.05393 0.00873,-1.892961 1.2389212,-3.099782 2.7403179,-3.089929 z"
- sodipodi:nodetypes="sscscss"
- inkscape:transform-center-x="0.18423798"
- inkscape:transform-center-y="-1.4061262" />
- <path
- inkscape:transform-center-y="1.3843595"
- inkscape:transform-center-x="-0.18536286"
- style="opacity:0.75;fill:#ffffff;fill-opacity:1;stroke:none;display:inline"
- id="path3891"
- inkscape:connector-curvature="0"
- d="M 7.2658469,16.715404 C 5.7649488,16.675487 4.5620394,15.54068 4.6171056,13.608982 c 5.308e-4,-0.01798 6.304e-4,-0.03602 0.00143,-0.05392 -0.012645,1.523617 1.1563015,2.816807 2.6397578,2.856266 1.4834547,0.03946 2.7588626,-1.030656 2.7982786,-2.711623 -1.32e-4,0.01791 -9.95e-4,0.03592 -0.0014,0.05392 -0.04665,1.892408 -1.288397,3.001702 -2.7892953,2.961779 z"
- sodipodi:nodetypes="sscscss" />
- <path
- inkscape:transform-center-y="-1.2783355"
- inkscape:transform-center-x="-0.17825997"
- sodipodi:nodetypes="sscscss"
- d="m 7.4112441,10.857057 c 1.5008986,0.03992 2.6914499,1.247371 2.6363839,3.17907 -5.31e-4,0.01798 -6.3e-4,0.03602 -0.0014,0.05392 0.01265,-1.523619 -1.157134,-2.785558 -2.64059,-2.825015 -1.483455,-0.03946 -2.7580303,0.999402 -2.7974484,2.680369 1.338e-4,-0.01792 9.953e-4,-0.03592 0.00143,-0.05392 0.046652,-1.892406 1.3007552,-3.074348 2.8016531,-3.034427 z"
- inkscape:connector-curvature="0"
- id="path3893"
- style="opacity:0.15;fill:#000000;fill-opacity:1;stroke:none;display:inline" />
- <path
- inkscape:connector-curvature="0"
- id="path4021"
- d="M 25.559837,19.375241 C 20.943325,18.463676 12.732572,16.97967 12.732572,16.97967 l 0.577198,0.271705 11.631124,2.455147 z"
- style="opacity:0.75;fill:#ffffff;fill-opacity:1;stroke:none;display:inline"
- sodipodi:nodetypes="ccccc" />
- <path
- inkscape:connector-curvature="0"
- id="path4023"
- d="M 12.732978,16.998382 13.18315,17.05794 20.372067,6.4504795 19.892575,6.6437071 z"
- style="opacity:0.15;fill:#000000;fill-opacity:1;stroke:none;display:inline"
- sodipodi:nodetypes="ccccc" />
- <path
- sodipodi:nodetypes="ccccc"
- style="opacity:0.15;fill:#000000;fill-opacity:1;stroke:none;display:inline"
- d="m 17.616917,15.427399 -0.536605,0.241627 12.450679,2.340457 0.07314,-0.349773 z"
- id="path4025"
- inkscape:connector-curvature="0" />
- <path
- sodipodi:nodetypes="ccccc"
- style="opacity:0.75;fill:#ffffff;fill-opacity:1;stroke:none;display:inline"
- d="m 24.020288,5.3820561 -6.978623,10.2909549 0.572778,-0.25839 6.676265,-9.8824969 z"
- id="path4027"
- inkscape:connector-curvature="0" />
-</svg>
diff --git a/resources/locale/compile-po.sh b/resources/locale/compile-po.sh
index 6b201de..f0944a3 100755
--- a/resources/locale/compile-po.sh
+++ b/resources/locale/compile-po.sh
@@ -2,5 +2,6 @@
for d in `ls -d */`
do
+ echo -n "$d "
msgfmt -c -v $d/LC_MESSAGES/*.po -o $d/LC_MESSAGES/gnomepie.mo
done
diff --git a/resources/locale/de/LC_MESSAGES/de.po b/resources/locale/de/LC_MESSAGES/de.po
index 9057020..9a43a67 100644
--- a/resources/locale/de/LC_MESSAGES/de.po
+++ b/resources/locale/de/LC_MESSAGES/de.po
@@ -7,9 +7,9 @@ msgid ""
msgstr ""
"Project-Id-Version: gnomepie 0.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-11-08 18:03+0100\n"
+"POT-Creation-Date: 2012-01-19 20:25+0100\n"
"PO-Revision-Date: 2011-08-25 21:04+0200\n"
-"Last-Translator: Simon Schneegans <simon.schneegans@uni-weimar.de>\n"
+"Last-Translator: Simon Schneegans <code@simonschneegans.de>\n"
"Language-Team: German\n"
"Language: de\n"
"MIME-Version: 1.0\n"
@@ -17,369 +17,252 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: ../../src/actions/keyAction.vala:33
+#: ../../src/actions/keyAction.vala:34
msgid "Press hotkey"
msgstr "Tastenkombination"
-#: ../../src/actions/appAction.vala:33
+#: ../../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/uriAction.vala:33
+#: ../../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/actionRegistry.vala:107
+#: ../../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:111
msgid "Trash"
msgstr "Müll"
-#: ../../src/actions/pieAction.vala:33
+#: ../../src/actions/pieAction.vala:34
msgid "Open Pie"
msgstr "Pie öffnen"
-#: ../../src/gui/triggerSelectWindow.vala:69
-msgid "Define an open-command"
-msgstr "Einen Hotkey festlegen"
-
-#: ../../src/gui/triggerSelectWindow.vala:87
-msgid "Click here if you want to bind a mouse button!"
-msgstr "Klicke hier um eine Maustaste zu binden"
-
-#: ../../src/gui/triggerSelectWindow.vala:102
-msgid "Turbo mode"
-msgstr "Turbo-Mode"
-
-#: ../../src/gui/triggerSelectWindow.vala:103
-msgid "If checked, the Pie will close when you release the chosen hot key."
-msgstr "Falls aktiviert schließt sich der Pie wieder automatisch, wenn der Hotkey losgelassen wird."
-
-#: ../../src/gui/triggerSelectWindow.vala:117
-msgid "Long press for activation"
-msgstr "Verzögerte Aktivierung"
-
-#: ../../src/gui/triggerSelectWindow.vala:118
-msgid ""
-"If checked, the Pie will only open if you press this hot key a bit longer."
-msgstr "Falls aktiviert wird sich der Pie erst öffnen, wenn der Hotkey länger gedrückt gehalten wird."
+#: ../../src/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:158
+#: ../../src/gui/triggerSelectWindow.vala:144
msgid ""
"This hotkey is already assigned to the pie \"%s\"! \n"
"\n"
"Please select another one or cancel your selection."
-msgstr "Dieser Hotkey ist schon dem Pie \"%s\" zugeordnet!\n Bitte wähle einen anderen!"
-
-#: ../../src/gui/triggerSelectWindow.vala:199
-msgid ""
-"It possible to make your system unusable if you bind a Pie to your left "
-"mouse button. Do you really want to do this?"
-msgstr "Wahrscheinlich machst du dein System unbenutzbar, wenn du die linke Maustaste bindest. Willst du das wirklich?"
-
-#: ../../src/gui/preferences.vala:32
-msgid "Gnome-Pie - Settings"
-msgstr "Gnome-Pie - Einstellungen"
-
-#: ../../src/gui/preferences.vala:55
-msgid "Behavior"
-msgstr "Verhalten"
-
-#: ../../src/gui/preferences.vala:65
-msgid "Startup on Login"
-msgstr "Beim Anmelden automatisch ausführen"
-
-#: ../../src/gui/preferences.vala:66
-msgid "If checked, Gnome-Pie will start when you log in."
-msgstr "Durch Aktivierung dieser Option wird Gnome-Pie automatisch starten, wenn du dich anmeldest."
-
-#: ../../src/gui/preferences.vala:72
-msgid "Show Indicator"
-msgstr "Benachrichtigungssymbol anzeigen"
-
-#: ../../src/gui/preferences.vala:73
-msgid ""
-"If checked, an indicator for easy access of the settings menu is shown in "
-"your panel."
-msgstr "Durch Aktivierung wird ein Indikator in deinem Panel angezeigt."
-
-#: ../../src/gui/preferences.vala:79
-msgid "Open Pies at Mouse"
-msgstr "Pies an der Maus öffnen"
-
-#: ../../src/gui/preferences.vala:80
-msgid ""
-"If checked, pies will open at your pointer. Otherwise they'll pop up in the "
-"middle of the screen."
-msgstr "Wenn aktiviert öffnen sich die Pies direkt an der Maus. Sonst öffnen sie sich in der Mitte des Bildschirms."
-
-#: ../../src/gui/preferences.vala:89
-msgid "Global Scale"
-msgstr "Skalierungsfaktor"
-
-#: ../../src/gui/preferences.vala:126
-msgid "Themes"
-msgstr "Themen"
-
-#: ../../src/gui/preferences.vala:144
-msgid "General"
-msgstr "Allgemein"
-
-#: ../../src/gui/preferences.vala:149
-msgid "Pies"
-msgstr "Pies"
-
-#: ../../src/gui/preferences.vala:173
-msgid "You can right-click in the list for adding or removing entries."
msgstr ""
-"Zum Löschen und Hinzufügen von Einträgen kannst \n"
-"du mit der rechten Maustaste in die Liste klicken."
-
-#: ../../src/gui/preferences.vala:174
-msgid ""
-"You can reset Gnome-Pie to its default options with the terminal command "
-"\"gnome-pie --reset\"."
-msgstr "Du kannst Gnome-Pie mit dem Terminalbefehl \"gnome-pie --reset\" auf die Standardeinstellungen zurücksetzen."
-
-#: ../../src/gui/preferences.vala:175
-msgid ""
-"The radiobutton at the beginning of each slice-line indicates the "
-"QuickAction of the pie."
-msgstr "Der Auswahlknopf vor jeder Slice zeigt die QuickAction jeder Pie an."
-
-#: ../../src/gui/preferences.vala:176
-msgid "Pies can be opened with the terminal command \"gnome-pie --open=ID\"."
-msgstr "Pies können mit dem Befehl \"gnome-pie --open=ID\" geöffnet werden."
+"Dieser Hotkey ist schon dem Pie \"%s\" zugeordnet!\n"
+" Bitte wähle einen anderen!"
-#: ../../src/gui/preferences.vala:177
-msgid "Feel free to visit Gnome-Pie's homepage at %s!"
-msgstr "Besuche Gnome-Pies Homepage auf %s!"
+#: ../../src/gui/preferencesWindow.vala:145
+msgid "No Pie selected."
+msgstr "Kein Pie gewählt."
-#: ../../src/gui/preferences.vala:178
-msgid "You can drag'n'drop applications from your main menu to the list above."
-msgstr "Du kannst Anwendungen von deinem Hauptmenü in die obige Liste ziehen."
-
-#: ../../src/gui/preferences.vala:179
-msgid "If you want to give some feedback, please write an e-mail to %s!"
-msgstr "Wenn du Feedback geben willst, schick eine E-Mail an %s!"
-
-#: ../../src/gui/preferences.vala:180
-msgid ""
-"You may drag'n'drop URLs and bookmarks from your internet browser to the "
-"list above."
-msgstr "Du kannst URLs und Links aus deinem Internet-Browser in die Liste ziehen."
-
-#: ../../src/gui/preferences.vala:181
-msgid "Bugs can be reported at %s!"
-msgstr "Bugs können auf %s gemeldet werden!"
-
-#: ../../src/gui/preferences.vala:182
-msgid ""
-"It's possible to drag'n'drop files and folders from your file browser to the "
-"list above."
-msgstr "Es ist möglich Dateien und Verzeichnisse aus deinem Datei-Browser in die Liste zu ziehen!"
-
-#: ../../src/gui/preferences.vala:183
-msgid ""
-"It's recommended to keep your Pies small (at most 6-8 Slices). Else they "
-"will become hard to navigate."
-msgstr "Es ist empfehlenswert, nur maximal acht Slices pro Pie zu verwenden. Sonst wird die Navigation schwierig."
+#: ../../src/gui/preferencesWindow.vala:181
+msgid "New Pie"
+msgstr "Neuer Pie"
-#: ../../src/gui/preferences.vala:184
+#: ../../src/gui/preferencesWindow.vala:190
msgid ""
-"In order to create a launcher for a Pie, drag the Pie from the list to your "
-"desktop!"
-msgstr "Du kannst Launcher für Pies erstellen. Ziehe sie dazu von obiger Liste auf deinen Desktop!"
-
-#: ../../src/gui/preferences.vala:193
-msgid "Moves the selected Slice down"
-msgstr ""
-"Verschiebt die gewählte Slice nach unten."
-
-#: ../../src/gui/preferences.vala:205
-msgid "Moves the selected Slice up"
-msgstr ""
-"Verschiebt die gewählte Slice nach oben."
-
-#: ../../src/gui/themeList.vala:88
-msgid "by"
-msgstr "von"
-
-#: ../../src/gui/pieList.vala:88 ../../src/gui/pieList.vala:850
-msgid "Slice group"
-msgstr "Slice-Gruppe"
-
-#: ../../src/gui/pieList.vala:135
-msgid "Icon"
-msgstr "Symbol"
-
-#: ../../src/gui/pieList.vala:200
-msgid "Command"
-msgstr "Kommando"
-
-#: ../../src/gui/pieList.vala:301 ../../src/gui/pieList.vala:706
-#: ../../src/gui/pieList.vala:866 ../../src/utilities/bindingManager.vala:156
-#: ../../src/utilities/trigger.vala:197 ../../src/utilities/trigger.vala:198
-msgid "Not bound"
-msgstr "Nicht zugewiesen"
+"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/pieList.vala:366
-msgid "Pie-ID / Action type"
-msgstr "Pie-ID / Slicetyp"
+#: ../../src/gui/newSliceWindow.vala:229
+msgid "Rename me!"
+msgstr "Benenne mich!"
-#: ../../src/gui/pieList.vala:427
-msgid "Name"
-msgstr "Name"
+#: ../../src/gui/piePreviewRenderer.vala:292
+msgid "Click to edit"
+msgstr "Editieren durch klicken"
-#: ../../src/gui/pieList.vala:470
-msgid "Add new Pie"
-msgstr "Pie hinzufügen"
+#: ../../src/gui/piePreviewRenderer.vala:292
+#: ../../src/gui/piePreviewRenderer.vala:307
+msgid "Drag to move"
+msgstr "Verschieben durch ziehen"
-#: ../../src/gui/pieList.vala:475
-msgid "Add new Slice"
-msgstr "Slice hinzufügen"
+#: ../../src/gui/piePreviewRenderer.vala:295
+msgid "Click to add a new Slice"
+msgstr "Neue Slice durch Klicken hinzufügen"
-#: ../../src/gui/pieList.vala:483
-msgid "Delete"
-msgstr "Eintrag löschen"
+#: ../../src/gui/piePreviewRenderer.vala:299
+msgid "Drop to add as new Slice"
+msgstr "Als neue Slice hinzuzufügen"
-#: ../../src/gui/pieList.vala:618
-msgid "New Pie"
-msgstr "Neuer Pie"
+#: ../../src/gui/piePreviewRenderer.vala:302
+msgid "Drop to move Slice"
+msgstr "Slice verschieben"
-#: ../../src/gui/pieList.vala:665
-msgid "New Action"
-msgstr "Neue Slice"
+#: ../../src/gui/piePreviewRenderer.vala:307
+msgid "Click to delete"
+msgstr "Löschen durch klicken"
-#: ../../src/gui/pieList.vala:679
-msgid "You have to select a Pie to add a Slice to!"
-msgstr ""
-"Es muss ein Pie ausgewählt sein, zu dem eine Slice hinzugefügt werden soll!"
+#: ../../src/gui/triggerSelectButton.vala:59
+msgid "Press a hotkey ..."
+msgstr "Wählen..."
-#: ../../src/gui/pieList.vala:729
-msgid "You have to select a Pie or a Slice to delete!"
-msgstr "Es muss etwas ausgewählt sein, das gelöscht werden soll!"
+#: ../../src/gui/piePreview.vala:120
+msgid "Do you really want to delete this Slice?"
+msgstr "Soll die ausgewählte Slice wirklich gelöscht werden?"
-#: ../../src/gui/pieList.vala:740
-msgid ""
-"Do you really want to delete the selected Pie with all contained Slices?"
-msgstr "Soll dieser Pie wirklich mit allen Slices gelöscht werden?"
+#: ../../src/gui/themeList.vala:48
+msgid "Themes"
+msgstr "Themen"
-#: ../../src/gui/pieList.vala:774
-msgid "Do you really want to delete the selected Slice?"
-msgstr "Soll die ausgewählte Slice wirklich gelöscht werden?"
+#: ../../src/gui/themeList.vala:80
+msgid "By"
+msgstr "Von"
-#: ../../src/gui/iconSelectWindow.vala:160
-msgid "Choose an Icon"
-msgstr "Wähle ein Symbol"
+#: ../../src/gui/sliceTypeList.vala:56
+msgid "Slice types"
+msgstr "Slice-Typen"
-#: ../../src/gui/iconSelectWindow.vala:196
+#: ../../src/gui/iconSelectWindow.vala:178
msgid "All icons"
msgstr "Alle Symbole"
-#: ../../src/gui/iconSelectWindow.vala:197
+#: ../../src/gui/iconSelectWindow.vala:179
#: ../../src/pies/defaultConfig.vala:36
msgid "Applications"
msgstr "Anwendungen"
-#: ../../src/gui/iconSelectWindow.vala:198
+#: ../../src/gui/iconSelectWindow.vala:180
msgid "Actions"
msgstr "Aktionen"
-#: ../../src/gui/iconSelectWindow.vala:199
+#: ../../src/gui/iconSelectWindow.vala:181
msgid "Places"
msgstr "Orte"
-#: ../../src/gui/iconSelectWindow.vala:200
+#: ../../src/gui/iconSelectWindow.vala:182
msgid "File types"
msgstr "Dateitypen"
-#: ../../src/gui/iconSelectWindow.vala:201
+#: ../../src/gui/iconSelectWindow.vala:183
msgid "Emotes"
msgstr "Smilies"
-#: ../../src/gui/iconSelectWindow.vala:202
+#: ../../src/gui/iconSelectWindow.vala:184
msgid "Miscellaneous"
msgstr "Sonstige"
-#: ../../src/gui/iconSelectWindow.vala:279
-msgid "Icon Theme"
-msgstr "Symbolthema"
-
-#: ../../src/gui/iconSelectWindow.vala:289
+#: ../../src/gui/iconSelectWindow.vala:257
msgid "All supported image formats"
msgstr "Alle unterstützten Bildformate"
-#: ../../src/gui/iconSelectWindow.vala:311
-msgid "Custom Icon"
-msgstr "Benutzerdefiniertes Symbol"
+#: ../../src/actionGroups/windowListGroup.vala:34
+msgid "Group: Window List"
+msgstr "Gruppe: Fensterliste"
-#: ../../src/actionGroups/windowListGroup.vala:33
-msgid "Window List"
-msgstr "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:34
-msgid "Main menu"
-msgstr "Hauptmenü"
+#: ../../src/actionGroups/menuGroup.vala:35
+msgid "Group: Main menu"
+msgstr "Gruppe: Hauptmenü"
-#: ../../src/actionGroups/clipboardGroup.vala:63
-msgid "Clipboard"
-msgstr "Zwischenablage"
+#: ../../src/actionGroups/menuGroup.vala:37
+msgid "Displays your main menu structure."
+msgstr "Zeigt das Hauptmenü an."
-#: ../../src/actionGroups/sessionGroup.vala:34
-msgid "Session Control"
-msgstr "Sitzung"
+#: ../../src/actionGroups/clipboardGroup.vala:64
+msgid "Group: Clipboard"
+msgstr "Gruppe: Zwischenablage"
-#: ../../src/actionGroups/sessionGroup.vala:52
+#: ../../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:55
+#: ../../src/actionGroups/sessionGroup.vala:63
msgid "Logout"
msgstr "Ausloggen"
-#: ../../src/actionGroups/sessionGroup.vala:58
+#: ../../src/actionGroups/sessionGroup.vala:66
msgid "Reboot"
msgstr "Neustarten"
-#: ../../src/actionGroups/bookmarkGroup.vala:35
-#: ../../src/pies/defaultConfig.vala:45
-msgid "Bookmarks"
-msgstr "Lesezeichen"
+#: ../../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:34
-msgid "Devices"
-msgstr "Laufwerke"
+#: ../../src/actionGroups/devicesGroup.vala:35
+msgid "Group: Devices"
+msgstr "Gruppe: Laufwerke"
-#: ../../src/actionGroups/devicesGroup.vala:82
+#: ../../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/trigger.vala:152
+#: ../../src/utilities/bindingManager.vala:155 ../../src/utilities/key.vala:65
+#: ../../src/utilities/trigger.vala:216 ../../src/utilities/trigger.vala:217
+msgid "Not bound"
+msgstr "Nicht zugewiesen"
+
+#: ../../src/utilities/trigger.vala:163
msgid "Button %i"
msgstr "Taste %i"
-#: ../../src/utilities/trigger.vala:155
+#: ../../src/utilities/trigger.vala:166
msgid "LeftButton"
msgstr "MausLinks"
-#: ../../src/utilities/trigger.vala:157
+#: ../../src/utilities/trigger.vala:168
msgid "RightButton"
msgstr "MausRechts"
-#: ../../src/utilities/trigger.vala:159
+#: ../../src/utilities/trigger.vala:170
msgid "MiddleButton"
msgstr "Mausrad"
-#: ../../src/utilities/trigger.vala:181 ../../src/utilities/trigger.vala:183
+#: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:194
+#: ../../src/utilities/trigger.vala:196 ../../src/utilities/trigger.vala:200
msgid "Turbo"
msgstr "Turbo"
-#: ../../src/utilities/trigger.vala:181 ../../src/utilities/trigger.vala:185
+#: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:196
+#: ../../src/utilities/trigger.vala:198 ../../src/utilities/trigger.vala:202
msgid "Delayed"
msgstr "Verzögert"
+#: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:194
+#: ../../src/utilities/trigger.vala:198 ../../src/utilities/trigger.vala:204
+msgid "Centered"
+msgstr "Zentriert"
+
#: ../../src/pies/defaultConfig.vala:29
msgid "Multimedia"
-msgstr ""
+msgstr "Multimedia"
#: ../../src/pies/defaultConfig.vala:30
msgid "Next Track"
@@ -397,6 +280,10 @@ msgstr "Vorheriger Titel"
msgid "Play/Pause"
msgstr "Play/Pause"
+#: ../../src/pies/defaultConfig.vala:45
+msgid "Bookmarks"
+msgstr "Lesezeichen"
+
#: ../../src/pies/defaultConfig.vala:50
msgid "Session"
msgstr "Sitzung"
@@ -429,5 +316,172 @@ msgstr "Maximieren"
msgid "Restore"
msgstr "Wiederherstellen"
-#~ msgid "Click to activate a Slice"
-#~ msgstr "Klicken um Slices zu aktivieren"
+#: ../ui/icon_select.ui:8
+msgid "Select an icon"
+msgstr "Wähle ein Symbol"
+
+#: ../ui/icon_select.ui:84
+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:44
+msgid "It's possible to bind mouse buttons as well!"
+msgstr "Es ist auch möglich, Maustasten zu binden!"
+
+#: ../ui/trigger_select.ui:76
+msgid "Turbo mode"
+msgstr "Turbo-Mode"
+
+#: ../ui/trigger_select.ui:80
+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:93
+msgid "Long press for activation"
+msgstr "Verzögerte Aktivierung"
+
+#: ../ui/trigger_select.ui:97
+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:110
+msgid "Open Pie centered on the screen"
+msgstr "Zentriert auf dem Bildschirm öffnen"
+
+#: ../ui/trigger_select.ui:114
+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:133
+msgid "Activation options"
+msgstr "Aktivierungsoptionen"
+
+#: ../ui/settings.ui:8 ../ui/preferences.ui:27
+msgid "General Settings"
+msgstr "Allgemeine Einstellungen"
+
+#: ../ui/settings.ui:47
+msgid "Start Gnome-Pie on login"
+msgstr "Beim Anmelden automatisch ausführen"
+
+#: ../ui/settings.ui:52 ../ui/settings.ui:53
+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:66
+msgid "Display panel icon "
+msgstr "Zeige ein Symbol im Panel"
+
+#: ../ui/settings.ui:71 ../ui/settings.ui:72
+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:92
+msgid "Global scale"
+msgstr "Skalierungsfaktor"
+
+#: ../ui/settings.ui:130
+msgid "Appearance and behavior"
+msgstr "Erscheinungsbild and Verhalten"
+
+#: ../ui/slice_select.ui:8
+msgid "Slice Options"
+msgstr "Slice-Optionen"
+
+#: ../ui/slice_select.ui:95
+msgid "There are no options for this Slice type."
+msgstr "Es gibt keine Otionen für diesen Slice-Typ."
+
+#: ../ui/slice_select.ui:121
+msgid "Name of the Slice "
+msgstr "Name"
+
+#: ../ui/slice_select.ui:159
+msgid "URI to open"
+msgstr "URI"
+
+#: ../ui/slice_select.ui:197
+msgid "Command to execute"
+msgstr "Befehl"
+
+#: ../ui/slice_select.ui:235
+msgid "Hotkey to press"
+msgstr "Tastenkomination"
+
+#: ../ui/slice_select.ui:264
+msgid "Pie to open"
+msgstr "Pie"
+
+#: ../ui/slice_select.ui:293
+msgid "Is Quick Action"
+msgstr "Ist Quick Action"
+
+#: ../ui/slice_select.ui:306
+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:339
+msgid "Slice options"
+msgstr "Slice-Optionen"
+
+#: ../ui/preferences.ui:8
+msgid "Gnome-Pie Settings"
+msgstr "Gnome-Pie - Einstellungen"
+
+#: ../ui/preferences.ui:261
+msgid ""
+"<b><big>This Pie is empty!</big>\n"
+"\n"
+"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... \n"
+"\n"
+"For manual and advanced configuration click on the plus sign."
+msgstr ""
+"<b><big>Der Pie ist leer!</big>\n"
+"\n"
+"Füge Slices hinzu!</b> 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 ""
+"<b><big>You have no Pies!</big>\n"
+"\n"
+"Start by creating one! </b> This can be done by clicking on the tiny little "
+"plus sign in the lower left corner."
+msgstr ""
+"<b><big>Du hast keine Pies!</big>\n"
+"\n"
+"Erstelle einen neuen! </b> Klicke dazu einfach auf das kleine Pluszeichen "
+"unter der leeren Liste auf der linken Seite."
+
+#: ../ui/rename_pie.ui:6
+msgid "Rename a Pie"
+msgstr "Pie umbenennen"
+
+#~ msgid "Appearance Options"
+#~ msgstr "Erscheinungsbild"
diff --git a/resources/locale/de/LC_MESSAGES/gnomepie.mo b/resources/locale/de/LC_MESSAGES/gnomepie.mo
index a5b5efb..f2c36f1 100644
--- a/resources/locale/de/LC_MESSAGES/gnomepie.mo
+++ b/resources/locale/de/LC_MESSAGES/gnomepie.mo
Binary files differ
diff --git a/resources/locale/es/LC_MESSAGES/es.po b/resources/locale/es/LC_MESSAGES/es.po
new file mode 100644
index 0000000..f549d5c
--- /dev/null
+++ b/resources/locale/es/LC_MESSAGES/es.po
@@ -0,0 +1,661 @@
+# Spanish translations for gnomepie package.
+# Copyright (C) 2011 Simon Schneegans <code@simonschneegans.de>
+# This file is distributed under the same license as the gnomepie package.
+# Eduardo Anabalon <lalo1412@gmail.com>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnomepie 0.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-01-19 19:42-0300\n"
+"PO-Revision-Date: 2011-11-20 19:11-0300\n"
+"Last-Translator: Eduardo Anabalon <lalo1412@gmail.com>\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/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:36
+#: ../../src/gui/iconSelectWindow.vala:179
+msgid "Applications"
+msgstr "Aplicaciones"
+
+#: ../../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 "Escala"
+
+#: ../../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"
+
+#: ../../src/actions/actionRegistry.vala:111
+msgid "Trash"
+msgstr "Basura"
+
+#: ../../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 URL's o rutas a archivos."
+
+#: ../../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/actions/keyAction.vala:34
+msgid "Press hotkey"
+msgstr "Presiona un atajo de teclado"
+
+#: ../../src/actions/keyAction.vala:36
+msgid "Simulates the activation of a hotkey."
+msgstr "Simula la activación de un atajo de teclado."
+
+#: ../../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 el comando dado."
+
+#: ../../src/gui/newSliceWindow.vala:229
+msgid "Rename me!"
+msgstr "Renombrame!"
+
+#: ../../src/gui/triggerSelectButton.vala:59
+#: ../../src/gui/hotkeySelectButton.vala:59
+#, fuzzy
+msgid "Press a hotkey ..."
+msgstr "Presiona un atajo de teclado"
+
+#: ../../src/gui/triggerSelectWindow.vala:144
+msgid ""
+"This hotkey is already assigned to the pie \"%s\"! \n"
+"\n"
+"Please select another one or cancel your selection."
+msgstr ""
+"Este atajo de teclado ya está asignado al pastel \"%s\"! \n"
+"\n"
+"Por favor seleciona otro o cancela la selección."
+
+#: ../../src/gui/iconSelectWindow.vala:178
+msgid "All icons"
+msgstr "Todos los iconos"
+
+#: ../../src/gui/iconSelectWindow.vala:180
+msgid "Actions"
+msgstr "Acciones"
+
+#: ../../src/gui/iconSelectWindow.vala:181
+msgid "Places"
+msgstr "Lugares"
+
+#: ../../src/gui/iconSelectWindow.vala:182
+msgid "File types"
+msgstr "Tipos de archivo"
+
+#: ../../src/gui/iconSelectWindow.vala:183
+msgid "Emotes"
+msgstr "Emotes"
+
+#: ../../src/gui/iconSelectWindow.vala:184
+msgid "Miscellaneous"
+msgstr "Misceláneos"
+
+#: ../../src/gui/iconSelectWindow.vala:257
+msgid "All supported image formats"
+msgstr "Todos los formatos de imágenes soportados"
+
+#: ../../src/gui/piePreview.vala:120
+#, fuzzy
+msgid "Do you really want to delete this Slice?"
+msgstr "¿Realmente quieres borrar la Rebanada seleccionada?"
+
+#: ../../src/gui/sliceTypeList.vala:56
+#, fuzzy
+msgid "Slice types"
+msgstr "Tipos de Rebanadas"
+
+#: ../../src/gui/preferencesWindow.vala:145
+msgid "No Pie selected."
+msgstr "Pastel no seleccionado."
+
+#: ../../src/gui/preferencesWindow.vala:181
+msgid "New Pie"
+msgstr "Nuevo Pastel"
+
+#: ../../src/gui/preferencesWindow.vala:190
+msgid ""
+"Do you really want to delete the selected Pie with all contained Slices?"
+msgstr ""
+"¿Realmente quieres borrar el Pastel seleccionado junto a todas sus Rebanadas?"
+
+#: ../../src/gui/piePreviewRenderer.vala:292
+msgid "Click to edit"
+msgstr "Click para editar"
+
+#: ../../src/gui/piePreviewRenderer.vala:292
+#: ../../src/gui/piePreviewRenderer.vala:307
+msgid "Drag to move"
+msgstr "Arrastra para mover"
+
+#: ../../src/gui/piePreviewRenderer.vala:295
+#, fuzzy
+msgid "Click to add a new Slice"
+msgstr "Añadir una nueva Rebanada"
+
+#: ../../src/gui/piePreviewRenderer.vala:299
+#, fuzzy
+msgid "Drop to add as new Slice"
+msgstr "Añadir una nueva Rebanada"
+
+#: ../../src/gui/piePreviewRenderer.vala:302
+msgid "Drop to move Slice"
+msgstr "Suelta para mover la Rebanada"
+
+#: ../../src/gui/piePreviewRenderer.vala:307
+msgid "Click to delete"
+msgstr "Click para borrar"
+
+#: ../../src/gui/themeList.vala:48
+msgid "Themes"
+msgstr "Temas"
+
+#: ../../src/gui/themeList.vala:80
+msgid "By"
+msgstr "Por"
+
+#: ../../src/actionGroups/sessionGroup.vala:35
+#, fuzzy
+msgid "Group: Session Control"
+msgstr "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/devicesGroup.vala:35
+#, fuzzy
+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/actionGroups/bookmarkGroup.vala:36
+#, fuzzy
+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 tus Marcadores."
+
+#: ../../src/actionGroups/clipboardGroup.vala:64
+#, fuzzy
+msgid "Group: Clipboard"
+msgstr "Grupo: Portapapeles"
+
+#: ../../src/actionGroups/clipboardGroup.vala:66
+msgid "Manages your Clipboard."
+msgstr "Administra tu Portapapeles."
+
+#: ../../src/actionGroups/menuGroup.vala:35
+#, fuzzy
+msgid "Group: Main menu"
+msgstr "Grupo: Menú principal"
+
+#: ../../src/actionGroups/menuGroup.vala:37
+msgid "Displays your main menu structure."
+msgstr "Muestra la estructura del menu principal."
+
+#: ../../src/actionGroups/windowListGroup.vala:34
+#, fuzzy
+msgid "Group: Window List"
+msgstr "Grupo: Lista de ventana"
+
+#: ../../src/actionGroups/windowListGroup.vala:36
+msgid "Shows a Slice for each of your opened Windows. Almost like Alt-Tab."
+msgstr "Muestra una Rebanada por cada Ventana abierta. Casi como Alt-Tab."
+
+#: ../../src/utilities/bindingManager.vala:155
+#: ../../src/utilities/trigger.vala:216 ../../src/utilities/trigger.vala:217
+#: ../../src/utilities/key.vala:65
+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ón Izquierdo"
+
+#: ../../src/utilities/trigger.vala:168
+msgid "RightButton"
+msgstr "Botón Derecho"
+
+#: ../../src/utilities/trigger.vala:170
+msgid "MiddleButton"
+msgstr "Botón Central"
+
+#: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:194
+#: ../../src/utilities/trigger.vala:196 ../../src/utilities/trigger.vala:200
+msgid "Turbo"
+msgstr "Turbo"
+
+#: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:196
+#: ../../src/utilities/trigger.vala:198 ../../src/utilities/trigger.vala:202
+msgid "Delayed"
+msgstr "Retrasado"
+
+#: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:194
+#: ../../src/utilities/trigger.vala:198 ../../src/utilities/trigger.vala:204
+msgid "Centered"
+msgstr "Centrado"
+
+#: ../ui/settings.ui:8 ../ui/preferences.ui:27
+#, fuzzy
+msgid "General Settings"
+msgstr "Gnome-Pie - Configuraciones"
+
+#: ../ui/settings.ui:47 ../ui/appearance.ui:46
+#, fuzzy
+msgid "Start Gnome-Pie on login"
+msgstr "Arrancar al iniciar"
+
+#: ../ui/settings.ui:52 ../ui/settings.ui:53
+#, fuzzy
+msgid "If checked, Gnome-Pie will start silently everytime you log in."
+msgstr "Si está activada, Gnome-Pie arrancará silenciosamente cada vez que inicies sesión."
+
+#: ../ui/settings.ui:66 ../ui/appearance.ui:62
+msgid "Display panel icon "
+msgstr "Mostrar panel de iconos "
+
+#: ../ui/settings.ui:71 ../ui/settings.ui:72
+msgid ""
+"If not checked, you can access this menu by launching Gnome-Pie a second "
+"time."
+msgstr ""
+"Si no está activada, puedes entrar a este menu arrancando Gnome-Pie por "
+"segunda vez."
+
+#: ../ui/settings.ui:92 ../ui/appearance.ui:123
+#, fuzzy
+msgid "Global scale"
+msgstr "Escala Global"
+
+#: ../ui/settings.ui:130
+msgid "Appearance and behavior"
+msgstr "Apariencia y comportamiento"
+
+#: ../ui/icon_select.ui:8
+msgid "Select an icon"
+msgstr "Selecciona un icono"
+
+#: ../ui/icon_select.ui:84
+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:44
+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:76
+msgid "Turbo mode"
+msgstr "Modo turbo"
+
+#: ../ui/trigger_select.ui:80
+msgid "If checked, the Pie will close when you release the chosen hot key."
+msgstr "Si está activada, el Pastel se cerrará cuando sueltes el atajo de teclado selecionado."
+
+#: ../ui/trigger_select.ui:93
+msgid "Long press for activation"
+msgstr "Pulsación larga para activar"
+
+#: ../ui/trigger_select.ui:97
+msgid ""
+"If checked, the Pie will only open if you press this hot key a bit longer."
+msgstr ""
+"Si está activada, el Pastel solo se abrirá si mantienes presionado el atajo de teclado un poco "
+"más."
+
+#: ../ui/trigger_select.ui:110
+msgid "Open Pie centered on the screen"
+msgstr "Abre el Pastel en el centro de la pantalla"
+
+#: ../ui/trigger_select.ui:114
+#, fuzzy
+msgid ""
+"If checked, the Pie will open in the middle of your screen. Else it will pop "
+"up at your pointer."
+msgstr ""
+"Si está activada, el Pastel abrirá en el medio de la pantalla. De lo contrario aparecerá "
+"en el puntero del ratón."
+
+#: ../ui/trigger_select.ui:133
+msgid "Activation options"
+msgstr "Opciones de activación"
+
+#: ../ui/rename_pie.ui:6
+#, fuzzy
+msgid "Rename a Pie"
+msgstr "Renombrar Pastel"
+
+#: ../ui/appearance.ui:8
+#, fuzzy
+msgid "Appearance Options"
+msgstr "Opciones de apariencia"
+
+#: ../ui/appearance.ui:84
+#, fuzzy
+msgid "<b>Behavior</b>"
+msgstr "<b>Comportamiento</b>"
+
+#: ../ui/appearance.ui:176
+msgid "<b>Appearance</b>"
+msgstr "<b>Apariencia</b>"
+
+#: ../ui/preferences.ui:8
+#, fuzzy
+msgid "Gnome-Pie Settings"
+msgstr "Gnome-Pie - Configuraciones"
+
+#: ../ui/preferences.ui:261
+msgid ""
+"<b><big>This Pie is empty!</big>\n"
+"\n"
+"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... \n"
+"\n"
+"For manual and advanced configuration click on the plus sign."
+msgstr ""
+"<b><big>Este Pastel esta vacío!</big>\n"
+"\n"
+"Empieza a añadirle Rebanadas!</b> Esto se puede hacer arrastrando cosas al "
+"signo más un poco más abajo. Puedes probar un montón! Por ejemplo lanzadores de aplicaciones o "
+"directorios. Incluso son posibles URLs desde tu navegador...\n"
+"\n"
+"Para configuración manual y avanzada, click en el signo más."
+
+#: ../ui/preferences.ui:282
+msgid ""
+"<b><big>You have no Pies!</big>\n"
+"\n"
+"Start by creating one! </b> This can be done by clicking on the tiny little "
+"plus sign in the lower left corner."
+msgstr ""
+"<b><big>No tienes Pasteles!</big>\n"
+"\n"
+"Empieza por crear uno! </b> Esto se puede hacer apretando sobre el pequeño signo "
+"más en la esquina inferior izquierda."
+
+#: ../ui/slice_select.ui:8
+#, fuzzy
+msgid "Slice Options"
+msgstr "Opciones de Rebanadas"
+
+#: ../ui/slice_select.ui:95
+msgid "There are no options for this Slice type."
+msgstr "No hay opciones para este tipo de Rebanada."
+
+#: ../ui/slice_select.ui:121
+msgid "Name of the Slice "
+msgstr "Nombre de la Rebanada "
+
+#: ../ui/slice_select.ui:159
+msgid "URI to open"
+msgstr "URI a abrir"
+
+#: ../ui/slice_select.ui:197
+msgid "Command to execute"
+msgstr "Comando a ejecutar"
+
+#: ../ui/slice_select.ui:235
+msgid "Hotkey to press"
+msgstr "Atajo de teclado a presionar"
+
+#: ../ui/slice_select.ui:264
+msgid "Pie to open"
+msgstr "Pastel a abrir"
+
+#: ../ui/slice_select.ui:293
+msgid "Is Quick Action"
+msgstr "Es una Acción Rápida"
+
+#: ../ui/slice_select.ui:306
+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:339
+#, fuzzy
+msgid "Slice options"
+msgstr "Opciones de Rebanada"
+
+#~ msgid "Define an open-command"
+#~ msgstr "Define un comando para abrir"
+
+#~ msgid "Click here if you want to bind a mouse button!"
+#~ msgstr "Click aquí si quieres enlazar un botón del ratón!"
+
+#~ 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 ""
+#~ "Es posible que su sistema sea inutilizable si se enlaza un Pastel al "
+#~ "botón izquierdo del ratón. ¿Realmente quieres hacer esto?"
+
+#~ msgid "Show Indicator"
+#~ msgstr "Mostrar Indicador"
+
+#~ msgid ""
+#~ "If checked, an indicator for easy access of the settings menu is shown in "
+#~ "your panel."
+#~ msgstr ""
+#~ "Si está activada, un indicador de acceso fácil al menú de configuraciones se mostrará en el "
+#~ "panel."
+
+#~ msgid "Open Pies at Mouse"
+#~ msgstr "Abre los Pasteles sobre el Ratón"
+
+#~ msgid ""
+#~ "If checked, pies will open at your pointer. Otherwise they'll pop up in "
+#~ "the middle of the screen."
+#~ msgstr ""
+#~ "Si está activada, los pasteles abrirán sobre el puntero. De otra manera abrirán en el medio "
+#~ "de la pantalla."
+
+#~ msgid "General"
+#~ msgstr "General"
+
+#~ msgid "Pies"
+#~ msgstr "Pasteles"
+
+#~ msgid "You can right-click in the list for adding or removing entries."
+#~ msgstr "Puedes hacer click derecho en la lista para añadir o remover entradas."
+
+#~ msgid ""
+#~ "You can reset Gnome-Pie to its default options with the terminal command "
+#~ "\"gnome-pie --reset\"."
+#~ msgstr ""
+#~ "Puedes resetear Gnome-Pie a las opciones por defecto con el comando "
+#~ "\"gnome-pie --reset\"."
+
+#~ msgid ""
+#~ "The radiobutton at the beginning of each slice-line indicates the "
+#~ "QuickAction of the pie."
+#~ msgstr ""
+#~ "El radiobutton en el comienzo de cada linea de una rebanada indica el "
+#~ "QuickAction del pastel."
+
+#~ msgid ""
+#~ "Pies can be opened with the terminal command \"gnome-pie --open=ID\"."
+#~ msgstr ""
+#~ "Los Pasteles pueden abrirse con el commando \"gnome-pie --open=ID\"."
+
+#~ msgid "Feel free to visit Gnome-Pie's homepage at %s!"
+#~ msgstr "Siéntase libre de visitar la página principal de Gnome-Pie en %s!"
+
+#~ msgid ""
+#~ "You can drag'n'drop applications from your main menu to the list above."
+#~ msgstr ""
+#~ "Puedes arrastrar y soltar aplicaciones desde el menú principal a la lista."
+
+#~ msgid "If you want to give some feedback, please write an e-mail to %s!"
+#~ msgstr "Si quieres enviar un comentario, por favor escribe un e-mail a %s!"
+
+#~ msgid ""
+#~ "You may drag'n'drop URLs and bookmarks from your internet browser to the "
+#~ "list above."
+#~ msgstr ""
+#~ "Puedes arrastrar y soltar URLs y marcadores desde tu navegador a la lista."
+
+#~ msgid "Bugs can be reported at %s!"
+#~ msgstr "Los errores pueden ser reportados en %s!"
+
+#~ msgid ""
+#~ "It's possible to drag'n'drop files and folders from your file browser to "
+#~ "the list above."
+#~ msgstr ""
+#~ "Es posible arrastrar y soltar archivos y directorios desde tu explorador "
+#~ "de archivos a la lista."
+
+#~ msgid ""
+#~ "It's recommended to keep your Pies small (at most 6-8 Slices). Else they "
+#~ "will become hard to navigate."
+#~ msgstr ""
+#~ "Es recomendado mantener los Pasteles pequeños (a lo más 6-8 Rebanadas). "
+#~ "De otra forma será difícil navegar entre ellos."
+
+#~ msgid ""
+#~ "In order to create a launcher for a Pie, drag the Pie from the list to "
+#~ "your desktop!"
+#~ msgstr ""
+#~ "Con el fin de crear un lanzador para un Pastel, arrastra el Pastel desde "
+#~ "la lista a tu escritorio!"
+
+#~ msgid "Moves the selected Slice down"
+#~ msgstr "Mueve la Rebanada seleccionada hacia abajo"
+
+#~ msgid "Moves the selected Slice up"
+#~ msgstr "Mueve la Rebanada seleccionada hacia arriba"
+
+#~ msgid "by"
+#~ msgstr "por"
+
+#~ msgid "Slice group"
+#~ msgstr "Grupo de Rebanadas"
+
+#~ msgid "Icon"
+#~ msgstr "Icono"
+
+#~ msgid "Command"
+#~ msgstr "Comando"
+
+#~ msgid "Pie-ID / Action type"
+#~ msgstr "Pastel-ID / Tipo de acción"
+
+#~ msgid "Name"
+#~ msgstr "Nombre"
+
+#~ msgid "Add new Pie"
+#~ msgstr "Añadir un nuevo Pastel"
+
+#~ msgid "Delete"
+#~ msgstr "Borrar"
+
+#~ msgid "New Action"
+#~ msgstr "Nueva Acción"
+
+#~ msgid "You have to select a Pie to add a Slice to!"
+#~ msgstr "Debes seleccionar un Pastel para añadir una Rebanada!"
+
+#~ msgid "You have to select a Pie or a Slice to delete!"
+#~ msgstr "Debes seleccionar un Pastel o una Rebanada para borrar!"
+
+#~ msgid "Choose an Icon"
+#~ msgstr "Selecciona un icono"
diff --git a/resources/locale/es/LC_MESSAGES/gnomepie.mo b/resources/locale/es/LC_MESSAGES/gnomepie.mo
new file mode 100644
index 0000000..02b1246
--- /dev/null
+++ b/resources/locale/es/LC_MESSAGES/gnomepie.mo
Binary files differ
diff --git a/resources/locale/fr/LC_MESSAGES/fr.po b/resources/locale/fr/LC_MESSAGES/fr.po
new file mode 100644
index 0000000..37e13a7
--- /dev/null
+++ b/resources/locale/fr/LC_MESSAGES/fr.po
@@ -0,0 +1,635 @@
+# French translations for gnomepie package.
+# Copyright (C) 2011 Simon Schneegans <code@simonschneegans.de>
+# This file is distributed under the same license as the gnomepie package.
+# Grégoire BELLON-GERVAIS <greggbg@gmail.com>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnomepie 0.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-01-19 20:25+0100\n"
+"PO-Revision-Date: 2011-12-06 14:29+0100\n"
+"Last-Translator: Grégoire BELLON-GERVAIS <greggbg@gmail.com>\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/actions/keyAction.vala:34
+msgid "Press hotkey"
+msgstr "Exécuter le raccourcis"
+
+#: ../../src/actions/keyAction.vala:36
+msgid "Simulates the activation of a hotkey."
+msgstr ""
+
+#: ../../src/actions/appAction.vala:34
+msgid "Launch application"
+msgstr "Lancer une application"
+
+#: ../../src/actions/appAction.vala:36
+msgid "Executes the given command."
+msgstr ""
+
+#: ../../src/actions/uriAction.vala:34
+msgid "Open URI"
+msgstr "Ouvrir une URI"
+
+#: ../../src/actions/uriAction.vala:36
+msgid "Opens a given location. You may use URL's or files paths."
+msgstr ""
+
+#: ../../src/actions/actionRegistry.vala:111
+msgid "Trash"
+msgstr "Poubelle"
+
+#: ../../src/actions/pieAction.vala:34
+msgid "Open Pie"
+msgstr "Ouvrir la Tarte"
+
+#: ../../src/actions/pieAction.vala:36
+msgid "Opens another Pie of Gnome-Pie. You may create sub menus this way."
+msgstr ""
+
+#: ../../src/gui/triggerSelectWindow.vala:144
+msgid ""
+"This hotkey is already assigned to the pie \"%s\"! \n"
+"\n"
+"Please select another one or cancel your selection."
+msgstr ""
+"Ce raccourcis est déjà assigné à la Tarte \"%s\" ! \n"
+"\n"
+"Merci d'en choisir un autre ou d'annuler votre choix."
+
+#: ../../src/gui/preferencesWindow.vala:145
+msgid "No Pie selected."
+msgstr ""
+
+#: ../../src/gui/preferencesWindow.vala:181
+msgid "New Pie"
+msgstr "Nouvelle Tarte"
+
+#: ../../src/gui/preferencesWindow.vala:190
+msgid ""
+"Do you really want to delete the selected Pie with all contained Slices?"
+msgstr ""
+"Voulez-vous supprimer la Tarte sélectionnée ainsi que toutes les Parts "
+"contenues ?"
+
+#: ../../src/gui/newSliceWindow.vala:229
+msgid "Rename me!"
+msgstr ""
+
+#: ../../src/gui/piePreviewRenderer.vala:292
+msgid "Click to edit"
+msgstr ""
+
+#: ../../src/gui/piePreviewRenderer.vala:292
+#: ../../src/gui/piePreviewRenderer.vala:307
+msgid "Drag to move"
+msgstr ""
+
+#: ../../src/gui/piePreviewRenderer.vala:295
+#, fuzzy
+msgid "Click to add a new Slice"
+msgstr "Ajouter une Part"
+
+#: ../../src/gui/piePreviewRenderer.vala:299
+#, fuzzy
+msgid "Drop to add as new Slice"
+msgstr "Ajouter une Part"
+
+#: ../../src/gui/piePreviewRenderer.vala:302
+msgid "Drop to move Slice"
+msgstr ""
+
+#: ../../src/gui/piePreviewRenderer.vala:307
+msgid "Click to delete"
+msgstr ""
+
+#: ../../src/gui/triggerSelectButton.vala:59
+#, fuzzy
+msgid "Press a hotkey ..."
+msgstr "Exécuter le raccourcis"
+
+#: ../../src/gui/piePreview.vala:120
+#, fuzzy
+msgid "Do you really want to delete this Slice?"
+msgstr "Voulez-vous supprimer la Part sélectionnée ?"
+
+#: ../../src/gui/themeList.vala:48
+msgid "Themes"
+msgstr "Thèmes"
+
+#: ../../src/gui/themeList.vala:80
+msgid "By"
+msgstr ""
+
+#: ../../src/gui/sliceTypeList.vala:56
+#, fuzzy
+msgid "Slice types"
+msgstr "Types de fichier"
+
+#: ../../src/gui/iconSelectWindow.vala:178
+msgid "All icons"
+msgstr "Tous les icones"
+
+#: ../../src/gui/iconSelectWindow.vala:179
+#: ../../src/pies/defaultConfig.vala:36
+msgid "Applications"
+msgstr "Applications"
+
+#: ../../src/gui/iconSelectWindow.vala:180
+msgid "Actions"
+msgstr "Actions"
+
+#: ../../src/gui/iconSelectWindow.vala:181
+msgid "Places"
+msgstr "Dossiers"
+
+#: ../../src/gui/iconSelectWindow.vala:182
+msgid "File types"
+msgstr "Types de fichier"
+
+#: ../../src/gui/iconSelectWindow.vala:183
+msgid "Emotes"
+msgstr "Emoticones"
+
+#: ../../src/gui/iconSelectWindow.vala:184
+msgid "Miscellaneous"
+msgstr "Divers"
+
+#: ../../src/gui/iconSelectWindow.vala:257
+msgid "All supported image formats"
+msgstr "Tous formats d'images supportés"
+
+#: ../../src/actionGroups/windowListGroup.vala:34
+#, fuzzy
+msgid "Group: Window List"
+msgstr "Liste de Fenêtre"
+
+#: ../../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 principal"
+
+#: ../../src/actionGroups/menuGroup.vala:37
+msgid "Displays your main menu structure."
+msgstr ""
+
+#: ../../src/actionGroups/clipboardGroup.vala:64
+#, fuzzy
+msgid "Group: Clipboard"
+msgstr "Presse-papier"
+
+#: ../../src/actionGroups/clipboardGroup.vala:66
+msgid "Manages your Clipboard."
+msgstr ""
+
+#: ../../src/actionGroups/sessionGroup.vala:35
+#, fuzzy
+msgid "Group: Session Control"
+msgstr "Gestion de la Session"
+
+#: ../../src/actionGroups/sessionGroup.vala:37
+msgid "Shows a Slice for Shutdown, Reboot, and Hibernate."
+msgstr ""
+
+#: ../../src/actionGroups/sessionGroup.vala:60
+msgid "Shutdown"
+msgstr "Arrêter"
+
+#: ../../src/actionGroups/sessionGroup.vala:63
+msgid "Logout"
+msgstr "Déconnecter"
+
+#: ../../src/actionGroups/sessionGroup.vala:66
+msgid "Reboot"
+msgstr "Redémarrer"
+
+#: ../../src/actionGroups/bookmarkGroup.vala:36
+#, fuzzy
+msgid "Group: Bookmarks"
+msgstr "Favoris"
+
+#: ../../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 "Périphériques"
+
+#: ../../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 "Racine"
+
+#: ../../src/utilities/bindingManager.vala:155 ../../src/utilities/key.vala:65
+#: ../../src/utilities/trigger.vala:216 ../../src/utilities/trigger.vala:217
+msgid "Not bound"
+msgstr "Non assigné"
+
+#: ../../src/utilities/trigger.vala:163
+msgid "Button %i"
+msgstr "Bouton %i"
+
+#: ../../src/utilities/trigger.vala:166
+msgid "LeftButton"
+msgstr "BoutonGauche"
+
+#: ../../src/utilities/trigger.vala:168
+msgid "RightButton"
+msgstr "BoutonDroit"
+
+#: ../../src/utilities/trigger.vala:170
+msgid "MiddleButton"
+msgstr "BoutonMilieu"
+
+#: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:194
+#: ../../src/utilities/trigger.vala:196 ../../src/utilities/trigger.vala:200
+msgid "Turbo"
+msgstr "Turbo"
+
+#: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:196
+#: ../../src/utilities/trigger.vala:198 ../../src/utilities/trigger.vala:202
+msgid "Delayed"
+msgstr "Différé"
+
+#: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:194
+#: ../../src/utilities/trigger.vala:198 ../../src/utilities/trigger.vala:204
+msgid "Centered"
+msgstr ""
+
+#: ../../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 "Echelle"
+
+#: ../../src/pies/defaultConfig.vala:60
+msgid "Minimize"
+msgstr "Réduire"
+
+#: ../../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"
+
+#: ../ui/icon_select.ui:8
+msgid "Select an icon"
+msgstr ""
+
+#: ../ui/icon_select.ui:84
+msgid "Icon Theme"
+msgstr "Thème d'icone"
+
+#: ../ui/icon_select.ui:105
+msgid "Custom Icon"
+msgstr "Icone Personnalisé"
+
+#: ../ui/trigger_select.ui:8
+msgid "Activation Settings"
+msgstr ""
+
+#: ../ui/trigger_select.ui:44
+msgid "It's possible to bind mouse buttons as well!"
+msgstr ""
+
+#: ../ui/trigger_select.ui:76
+msgid "Turbo mode"
+msgstr "Mode turbo"
+
+#: ../ui/trigger_select.ui:80
+msgid "If checked, the Pie will close when you release the chosen hot key."
+msgstr "La Tarte se fermera quand vous relachez le raccourcis clavier "
+
+#: ../ui/trigger_select.ui:93
+msgid "Long press for activation"
+msgstr "Appuyer longuement pour activer"
+
+#: ../ui/trigger_select.ui:97
+msgid ""
+"If checked, the Pie will only open if you press this hot key a bit longer."
+msgstr ""
+"La Tarte s'ouvrira uniquement si vous appuyez sur le raccourcis longtemps"
+
+#: ../ui/trigger_select.ui:110
+msgid "Open Pie centered on the screen"
+msgstr ""
+
+#: ../ui/trigger_select.ui:114
+#, fuzzy
+msgid ""
+"If checked, the Pie will open in the middle of your screen. Else it will pop "
+"up at your pointer."
+msgstr ""
+"La Tarte s'ouvrira uniquement si vous appuyez sur le raccourcis longtemps"
+
+#: ../ui/trigger_select.ui:133
+msgid "<b>Activation options</b>"
+msgstr ""
+
+#: ../ui/settings.ui:8 ../ui/preferences.ui:27
+#, fuzzy
+msgid "General Settings"
+msgstr "Gnome-Pie - Réglages"
+
+#: ../ui/settings.ui:47
+#, fuzzy
+msgid "Start Gnome-Pie on login"
+msgstr "Démarrer à la Connexion"
+
+#: ../ui/settings.ui:52 ../ui/settings.ui:53
+#, fuzzy
+msgid "If checked, Gnome-Pie will start silently everytime you log in."
+msgstr "Si coché, Gnome-Pie démarrera quand vous vous connectez"
+
+#: ../ui/settings.ui:66
+msgid "Display panel icon "
+msgstr ""
+
+#: ../ui/settings.ui:71 ../ui/settings.ui:72
+msgid ""
+"If not checked, you can access this menu by launching Gnome-Pie a second "
+"time."
+msgstr ""
+
+#: ../ui/settings.ui:92
+#, fuzzy
+msgid "Global scale"
+msgstr "Echelle Globale"
+
+#: ../ui/settings.ui:130
+msgid "<b>Appearance and behavior</b>"
+msgstr ""
+
+#: ../ui/slice_select.ui:8
+#, fuzzy
+msgid "Slice Options"
+msgstr "Applications"
+
+#: ../ui/slice_select.ui:95
+msgid "There are no options for this Slice type."
+msgstr ""
+
+#: ../ui/slice_select.ui:121
+msgid "Name of the Slice "
+msgstr ""
+
+#: ../ui/slice_select.ui:159
+msgid "URI to open"
+msgstr ""
+
+#: ../ui/slice_select.ui:197
+msgid "Command to execute"
+msgstr ""
+
+#: ../ui/slice_select.ui:235
+msgid "Hotkey to press"
+msgstr ""
+
+#: ../ui/slice_select.ui:264
+msgid "Pie to open"
+msgstr ""
+
+#: ../ui/slice_select.ui:293
+msgid "Is Quick Action"
+msgstr ""
+
+#: ../ui/slice_select.ui:306
+msgid "This Slice will be executed when you click in the middle of the Pie."
+msgstr ""
+
+#: ../ui/slice_select.ui:339
+msgid "<b>Slice options</b>"
+msgstr ""
+
+#: ../ui/preferences.ui:8
+#, fuzzy
+msgid "Gnome-Pie Settings"
+msgstr "Gnome-Pie - Réglages"
+
+#: ../ui/preferences.ui:261
+msgid ""
+"<b><big>This Pie is empty!</big>\n"
+"\n"
+"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... \n"
+"\n"
+"For manual and advanced configuration click on the plus sign."
+msgstr ""
+
+#: ../ui/preferences.ui:282
+msgid ""
+"<b><big>You have no Pies!</big>\n"
+"\n"
+"Start by creating one! </b> This can be done by clicking on the tiny little "
+"plus sign in the lower left corner."
+msgstr ""
+
+#: ../ui/rename_pie.ui:6
+#, fuzzy
+msgid "Rename a Pie"
+msgstr "Ouvrir la Tarte"
+
+#~ msgid "Define an open-command"
+#~ msgstr "Définir une commande d'ouverture"
+
+#~ msgid "Click here if you want to bind a mouse button!"
+#~ msgstr "Cliquer ici pour assigner un bouton de la souris"
+
+#~ 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 ""
+#~ "Vous pouvez rendre votre système inutilisable en assignant le clic gauche "
+#~ "de la souris. Voulez-vous vraiment continuer ?"
+
+#~ msgid "Choose an Icon"
+#~ msgstr "Choisir un Icone"
+
+#~ msgid "Slice group"
+#~ msgstr "Groupe de Parts"
+
+#~ msgid "Icon"
+#~ msgstr "Icone"
+
+#~ msgid "Command"
+#~ msgstr "Commande"
+
+#~ msgid "Pie-ID / Action type"
+#~ msgstr "Tarte-ID / Type d'action"
+
+#~ msgid "Name"
+#~ msgstr "Nom"
+
+#~ msgid "Add new Pie"
+#~ msgstr "AJouter une Tarte"
+
+#~ msgid "Delete"
+#~ msgstr "Effacer"
+
+#~ msgid "New Action"
+#~ msgstr "Nouvelle Action"
+
+#~ msgid "You have to select a Pie to add a Slice to!"
+#~ msgstr "Sélectionner d'abord une Tarte pour ajouter une Part"
+
+#~ msgid "You have to select a Pie or a Slice to delete!"
+#~ msgstr "Sélectionner une Tarte ou une Part pour la supprimer"
+
+#~ msgid "Behavior"
+#~ msgstr "Comportement"
+
+#~ msgid "Show Indicator"
+#~ msgstr "Afficher l'Indicateur"
+
+#~ msgid ""
+#~ "If checked, an indicator for easy access of the settings menu is shown in "
+#~ "your panel."
+#~ msgstr ""
+#~ "Si coché, un indicateur apparaitra dans la zone de notification afin "
+#~ "d'accéder rapidement aux réglages de Gnome-Pie"
+
+#~ msgid "Open Pies at Mouse"
+#~ msgstr "Ouvrir les Tartes sous la Souris"
+
+#~ msgid ""
+#~ "If checked, pies will open at your pointer. Otherwise they'll pop up in "
+#~ "the middle of the screen."
+#~ msgstr ""
+#~ "Si coché, les Tartes apparaîtront sous le pointeur. Sinon, elles "
+#~ "s'ouvriront au centre de l'écran."
+
+#~ msgid "General"
+#~ msgstr "Général"
+
+#~ msgid "Pies"
+#~ msgstr "Tartes"
+
+#~ msgid "You can right-click in the list for adding or removing entries."
+#~ msgstr "Le clic-droit permet d'ajouter ou de supprimer des entrées."
+
+#~ msgid ""
+#~ "You can reset Gnome-Pie to its default options with the terminal command "
+#~ "\"gnome-pie --reset\"."
+#~ msgstr ""
+#~ "Vous pouvez restaurer les paramètres par défaut avec la commande \"gnome-"
+#~ "pie --reset\"."
+
+#~ msgid ""
+#~ "The radiobutton at the beginning of each slice-line indicates the "
+#~ "QuickAction of the pie."
+#~ msgstr ""
+#~ "Le bouton radio au début de chaque ligne de Part indique l'Action Rapide "
+#~ "de la Tarte."
+
+#~ msgid ""
+#~ "Pies can be opened with the terminal command \"gnome-pie --open=ID\"."
+#~ msgstr ""
+#~ "Les Tartes peuvent être lancées avec la commande \"gnome-pie --open=ID\"."
+
+#~ msgid "Feel free to visit Gnome-Pie's homepage at %s!"
+#~ msgstr "N'hésiter pas à visiter la page web de Gnome-Pie at %s !"
+
+#~ msgid ""
+#~ "You can drag'n'drop applications from your main menu to the list above."
+#~ msgstr ""
+#~ "Vous pouvez glisser-déposer des applications depuis le menu principal "
+#~ "dans la liste ci-dessus."
+
+#~ msgid "If you want to give some feedback, please write an e-mail to %s!"
+#~ msgstr "Pour envoyer vos remarques, vous pouvez écrire à l'adresse %s !"
+
+#~ msgid ""
+#~ "You may drag'n'drop URLs and bookmarks from your internet browser to the "
+#~ "list above."
+#~ msgstr ""
+#~ "Vous pouvez glisser-déposer des URLs et des favoris depuis votre "
+#~ "navigateur dans la liste ci-dessus."
+
+#~ msgid "Bugs can be reported at %s!"
+#~ msgstr "Les Bugs peuvent être envoyés à %s !"
+
+#~ msgid ""
+#~ "It's possible to drag'n'drop files and folders from your file browser to "
+#~ "the list above."
+#~ msgstr ""
+#~ "Vous pouvez glisser-déposer des fichiers et des dossiers depuis "
+#~ "l'explorateur dans la liste ci-dessus."
+
+#~ msgid ""
+#~ "It's recommended to keep your Pies small (at most 6-8 Slices). Else they "
+#~ "will become hard to navigate."
+#~ msgstr ""
+#~ "Il est recommandé de garder les Tartes petites (pas plus de 6-8 Parts) "
+#~ "afin de leur conserver leur facilité de navigation."
+
+#~ msgid ""
+#~ "In order to create a launcher for a Pie, drag the Pie from the list to "
+#~ "your desktop!"
+#~ msgstr ""
+#~ "Afin de créer un lanceur pour une Tarte, vous pouvez déposer la Tarte "
+#~ "directement sur votre bureau !"
+
+#~ msgid "Moves the selected Slice down"
+#~ msgstr "Déplace la Part sélectionnée vers le bas"
+
+#~ msgid "Moves the selected Slice up"
+#~ msgstr "Déplace la Part sélectionnée vers le haut"
+
+#~ msgid "by"
+#~ msgstr "par"
diff --git a/resources/locale/fr/LC_MESSAGES/gnomepie.mo b/resources/locale/fr/LC_MESSAGES/gnomepie.mo
new file mode 100644
index 0000000..bd81507
--- /dev/null
+++ b/resources/locale/fr/LC_MESSAGES/gnomepie.mo
Binary files differ
diff --git a/resources/locale/gen-pot.sh b/resources/locale/gen-pot.sh
index 356e12e..7b7f156 100755
--- a/resources/locale/gen-pot.sh
+++ b/resources/locale/gen-pot.sh
@@ -3,12 +3,21 @@
# Searches trough all vala files of Gnome-Pie and generates
# a gnomepie.pot for strings which need to be translated.
-filelist=$( find ../../src/ -name '*.vala' -printf "%h/%f " )
-
domain="gnomepie"
-version="0.2"
+version="0.4"
copyright="Simon Schneegans <code@simonschneegans.de>"
+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" \
+ -k_ \
+ -L Glade \
+ $filelist
+
+filelist=$( find ../../src/ -name '*.vala' -printf "%h/%f " )
xgettext --package-name $domain \
--package-version $version \
--default-domain $domain \
@@ -17,6 +26,9 @@ xgettext --package-name $domain \
-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
diff --git a/resources/locale/gnomepie.pot b/resources/locale/gnomepie.pot
deleted file mode 100644
index b2af1aa..0000000
--- a/resources/locale/gnomepie.pot
+++ /dev/null
@@ -1,425 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Simon Schneegans <code@simonschneegans.de>
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: gnomepie 0.2\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-11-10 08:00+0100\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../../src/actions/keyAction.vala:33
-msgid "Press hotkey"
-msgstr ""
-
-#: ../../src/actions/appAction.vala:33
-msgid "Launch application"
-msgstr ""
-
-#: ../../src/actions/uriAction.vala:33
-msgid "Open URI"
-msgstr ""
-
-#: ../../src/actions/actionRegistry.vala:107
-msgid "Trash"
-msgstr ""
-
-#: ../../src/actions/pieAction.vala:33
-msgid "Open Pie"
-msgstr ""
-
-#: ../../src/gui/triggerSelectWindow.vala:69
-msgid "Define an open-command"
-msgstr ""
-
-#: ../../src/gui/triggerSelectWindow.vala:87
-msgid "Click here if you want to bind a mouse button!"
-msgstr ""
-
-#: ../../src/gui/triggerSelectWindow.vala:102
-msgid "Turbo mode"
-msgstr ""
-
-#: ../../src/gui/triggerSelectWindow.vala:103
-msgid "If checked, the Pie will close when you release the chosen hot key."
-msgstr ""
-
-#: ../../src/gui/triggerSelectWindow.vala:117
-msgid "Long press for activation"
-msgstr ""
-
-#: ../../src/gui/triggerSelectWindow.vala:118
-msgid ""
-"If checked, the Pie will only open if you press this hot key a bit longer."
-msgstr ""
-
-#: ../../src/gui/triggerSelectWindow.vala:156
-msgid ""
-"This hotkey is already assigned to the pie \"%s\"! \n"
-"\n"
-"Please select another one or cancel your selection."
-msgstr ""
-
-#: ../../src/gui/triggerSelectWindow.vala:197
-msgid ""
-"It possible to make your system unusable if you bind a Pie to your left "
-"mouse button. Do you really want to do this?"
-msgstr ""
-
-#: ../../src/gui/preferences.vala:32
-msgid "Gnome-Pie - Settings"
-msgstr ""
-
-#: ../../src/gui/preferences.vala:55
-msgid "Behavior"
-msgstr ""
-
-#: ../../src/gui/preferences.vala:65
-msgid "Startup on Login"
-msgstr ""
-
-#: ../../src/gui/preferences.vala:66
-msgid "If checked, Gnome-Pie will start when you log in."
-msgstr ""
-
-#: ../../src/gui/preferences.vala:72
-msgid "Show Indicator"
-msgstr ""
-
-#: ../../src/gui/preferences.vala:73
-msgid ""
-"If checked, an indicator for easy access of the settings menu is shown in "
-"your panel."
-msgstr ""
-
-#: ../../src/gui/preferences.vala:79
-msgid "Open Pies at Mouse"
-msgstr ""
-
-#: ../../src/gui/preferences.vala:80
-msgid ""
-"If checked, pies will open at your pointer. Otherwise they'll pop up in the "
-"middle of the screen."
-msgstr ""
-
-#: ../../src/gui/preferences.vala:89
-msgid "Global Scale"
-msgstr ""
-
-#: ../../src/gui/preferences.vala:126
-msgid "Themes"
-msgstr ""
-
-#: ../../src/gui/preferences.vala:144
-msgid "General"
-msgstr ""
-
-#: ../../src/gui/preferences.vala:149
-msgid "Pies"
-msgstr ""
-
-#: ../../src/gui/preferences.vala:173
-msgid "You can right-click in the list for adding or removing entries."
-msgstr ""
-
-#: ../../src/gui/preferences.vala:174
-msgid ""
-"You can reset Gnome-Pie to its default options with the terminal command "
-"\"gnome-pie --reset\"."
-msgstr ""
-
-#: ../../src/gui/preferences.vala:175
-msgid ""
-"The radiobutton at the beginning of each slice-line indicates the "
-"QuickAction of the pie."
-msgstr ""
-
-#: ../../src/gui/preferences.vala:176
-msgid "Pies can be opened with the terminal command \"gnome-pie --open=ID\"."
-msgstr ""
-
-#: ../../src/gui/preferences.vala:177
-msgid "Feel free to visit Gnome-Pie's homepage at %s!"
-msgstr ""
-
-#: ../../src/gui/preferences.vala:178
-msgid "You can drag'n'drop applications from your main menu to the list above."
-msgstr ""
-
-#: ../../src/gui/preferences.vala:179
-msgid "If you want to give some feedback, please write an e-mail to %s!"
-msgstr ""
-
-#: ../../src/gui/preferences.vala:180
-msgid ""
-"You may drag'n'drop URLs and bookmarks from your internet browser to the "
-"list above."
-msgstr ""
-
-#: ../../src/gui/preferences.vala:181
-msgid "Bugs can be reported at %s!"
-msgstr ""
-
-#: ../../src/gui/preferences.vala:182
-msgid ""
-"It's possible to drag'n'drop files and folders from your file browser to the "
-"list above."
-msgstr ""
-
-#: ../../src/gui/preferences.vala:183
-msgid ""
-"It's recommended to keep your Pies small (at most 6-8 Slices). Else they "
-"will become hard to navigate."
-msgstr ""
-
-#: ../../src/gui/preferences.vala:184
-msgid ""
-"In order to create a launcher for a Pie, drag the Pie from the list to your "
-"desktop!"
-msgstr ""
-
-#: ../../src/gui/preferences.vala:193
-msgid "Moves the selected Slice down"
-msgstr ""
-
-#: ../../src/gui/preferences.vala:205
-msgid "Moves the selected Slice up"
-msgstr ""
-
-#: ../../src/gui/themeList.vala:88
-msgid "by"
-msgstr ""
-
-#: ../../src/gui/pieList.vala:88 ../../src/gui/pieList.vala:851
-msgid "Slice group"
-msgstr ""
-
-#: ../../src/gui/pieList.vala:135
-msgid "Icon"
-msgstr ""
-
-#: ../../src/gui/pieList.vala:200
-msgid "Command"
-msgstr ""
-
-#: ../../src/gui/pieList.vala:301 ../../src/gui/pieList.vala:707
-#: ../../src/gui/pieList.vala:867 ../../src/utilities/bindingManager.vala:156
-#: ../../src/utilities/trigger.vala:197 ../../src/utilities/trigger.vala:198
-msgid "Not bound"
-msgstr ""
-
-#: ../../src/gui/pieList.vala:366
-msgid "Pie-ID / Action type"
-msgstr ""
-
-#: ../../src/gui/pieList.vala:427
-msgid "Name"
-msgstr ""
-
-#: ../../src/gui/pieList.vala:470
-msgid "Add new Pie"
-msgstr ""
-
-#: ../../src/gui/pieList.vala:475
-msgid "Add new Slice"
-msgstr ""
-
-#: ../../src/gui/pieList.vala:483
-msgid "Delete"
-msgstr ""
-
-#: ../../src/gui/pieList.vala:619
-msgid "New Pie"
-msgstr ""
-
-#: ../../src/gui/pieList.vala:666
-msgid "New Action"
-msgstr ""
-
-#: ../../src/gui/pieList.vala:680
-msgid "You have to select a Pie to add a Slice to!"
-msgstr ""
-
-#: ../../src/gui/pieList.vala:730
-msgid "You have to select a Pie or a Slice to delete!"
-msgstr ""
-
-#: ../../src/gui/pieList.vala:741
-msgid ""
-"Do you really want to delete the selected Pie with all contained Slices?"
-msgstr ""
-
-#: ../../src/gui/pieList.vala:775
-msgid "Do you really want to delete the selected Slice?"
-msgstr ""
-
-#: ../../src/gui/iconSelectWindow.vala:160
-msgid "Choose an Icon"
-msgstr ""
-
-#: ../../src/gui/iconSelectWindow.vala:196
-msgid "All icons"
-msgstr ""
-
-#: ../../src/gui/iconSelectWindow.vala:197
-#: ../../src/pies/defaultConfig.vala:36
-msgid "Applications"
-msgstr ""
-
-#: ../../src/gui/iconSelectWindow.vala:198
-msgid "Actions"
-msgstr ""
-
-#: ../../src/gui/iconSelectWindow.vala:199
-msgid "Places"
-msgstr ""
-
-#: ../../src/gui/iconSelectWindow.vala:200
-msgid "File types"
-msgstr ""
-
-#: ../../src/gui/iconSelectWindow.vala:201
-msgid "Emotes"
-msgstr ""
-
-#: ../../src/gui/iconSelectWindow.vala:202
-msgid "Miscellaneous"
-msgstr ""
-
-#: ../../src/gui/iconSelectWindow.vala:279
-msgid "Icon Theme"
-msgstr ""
-
-#: ../../src/gui/iconSelectWindow.vala:289
-msgid "All supported image formats"
-msgstr ""
-
-#: ../../src/gui/iconSelectWindow.vala:311
-msgid "Custom Icon"
-msgstr ""
-
-#: ../../src/actionGroups/windowListGroup.vala:33
-msgid "Window List"
-msgstr ""
-
-#: ../../src/actionGroups/menuGroup.vala:34
-msgid "Main menu"
-msgstr ""
-
-#: ../../src/actionGroups/clipboardGroup.vala:63
-msgid "Clipboard"
-msgstr ""
-
-#: ../../src/actionGroups/sessionGroup.vala:34
-msgid "Session Control"
-msgstr ""
-
-#: ../../src/actionGroups/sessionGroup.vala:52
-msgid "Shutdown"
-msgstr ""
-
-#: ../../src/actionGroups/sessionGroup.vala:55
-msgid "Logout"
-msgstr ""
-
-#: ../../src/actionGroups/sessionGroup.vala:58
-msgid "Reboot"
-msgstr ""
-
-#: ../../src/actionGroups/bookmarkGroup.vala:35
-#: ../../src/pies/defaultConfig.vala:45
-msgid "Bookmarks"
-msgstr ""
-
-#: ../../src/actionGroups/devicesGroup.vala:34
-msgid "Devices"
-msgstr ""
-
-#: ../../src/actionGroups/devicesGroup.vala:82
-msgid "Root"
-msgstr ""
-
-#: ../../src/utilities/trigger.vala:152
-msgid "Button %i"
-msgstr ""
-
-#: ../../src/utilities/trigger.vala:155
-msgid "LeftButton"
-msgstr ""
-
-#: ../../src/utilities/trigger.vala:157
-msgid "RightButton"
-msgstr ""
-
-#: ../../src/utilities/trigger.vala:159
-msgid "MiddleButton"
-msgstr ""
-
-#: ../../src/utilities/trigger.vala:181 ../../src/utilities/trigger.vala:183
-msgid "Turbo"
-msgstr ""
-
-#: ../../src/utilities/trigger.vala:181 ../../src/utilities/trigger.vala:185
-msgid "Delayed"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:29
-msgid "Multimedia"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:30
-msgid "Next Track"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:31
-msgid "Stop"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:32
-msgid "Previous Track"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:33
-msgid "Play/Pause"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:50
-msgid "Session"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:54
-msgid "Main Menu"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:58
-msgid "Window"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:59
-msgid "Scale"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:60
-msgid "Minimize"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:61
-msgid "Close"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:62
-msgid "Maximize"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:63
-msgid "Restore"
-msgstr ""
diff --git a/resources/locale/it/LC_MESSAGES/gnomepie.mo b/resources/locale/it/LC_MESSAGES/gnomepie.mo
index d540e35..f7b33cc 100644
--- a/resources/locale/it/LC_MESSAGES/gnomepie.mo
+++ b/resources/locale/it/LC_MESSAGES/gnomepie.mo
Binary files differ
diff --git a/resources/locale/it/LC_MESSAGES/it.po b/resources/locale/it/LC_MESSAGES/it.po
index ab808e8..ab67977 100644
--- a/resources/locale/it/LC_MESSAGES/it.po
+++ b/resources/locale/it/LC_MESSAGES/it.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnomepie 0.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-11-09 11:01+0100\n"
+"POT-Creation-Date: 2012-01-19 20:25+0100\n"
"PO-Revision-Date: 2011-11-09 12:52+0100\n"
"Last-Translator: Riccardo Traverso <gr3yfox.fw@gmail.com>\n"
"Language-Team: Italian\n"
@@ -18,6 +18,259 @@ msgstr ""
"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:111
+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:144
+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:145
+msgid "No Pie selected."
+msgstr ""
+
+#: ../../src/gui/preferencesWindow.vala:181
+msgid "New Pie"
+msgstr "Nuova Torta"
+
+#: ../../src/gui/preferencesWindow.vala:190
+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:229
+msgid "Rename me!"
+msgstr ""
+
+#: ../../src/gui/piePreviewRenderer.vala:292
+msgid "Click to edit"
+msgstr ""
+
+#: ../../src/gui/piePreviewRenderer.vala:292
+#: ../../src/gui/piePreviewRenderer.vala:307
+msgid "Drag to move"
+msgstr ""
+
+#: ../../src/gui/piePreviewRenderer.vala:295
+#, fuzzy
+msgid "Click to add a new Slice"
+msgstr "Aggiungi nuova Fetta"
+
+#: ../../src/gui/piePreviewRenderer.vala:299
+#, fuzzy
+msgid "Drop to add as new Slice"
+msgstr "Aggiungi nuova Fetta"
+
+#: ../../src/gui/piePreviewRenderer.vala:302
+msgid "Drop to move Slice"
+msgstr ""
+
+#: ../../src/gui/piePreviewRenderer.vala:307
+msgid "Click to delete"
+msgstr ""
+
+#: ../../src/gui/triggerSelectButton.vala:59
+#, fuzzy
+msgid "Press a hotkey ..."
+msgstr "Pressione di tasti"
+
+#: ../../src/gui/piePreview.vala:120
+#, fuzzy
+msgid "Do you really want to delete this Slice?"
+msgstr "Vuoi davvero eliminare la Fetta selezionata?"
+
+#: ../../src/gui/themeList.vala:48
+msgid "Themes"
+msgstr "Temi"
+
+#: ../../src/gui/themeList.vala:80
+msgid "By"
+msgstr ""
+
+#: ../../src/gui/sliceTypeList.vala:56
+#, fuzzy
+msgid "Slice types"
+msgstr "Tipi di file"
+
+#: ../../src/gui/iconSelectWindow.vala:178
+msgid "All icons"
+msgstr "Tutte le icone"
+
+#: ../../src/gui/iconSelectWindow.vala:179
+#: ../../src/pies/defaultConfig.vala:36
+msgid "Applications"
+msgstr "Applicazioni"
+
+#: ../../src/gui/iconSelectWindow.vala:180
+msgid "Actions"
+msgstr "Azioni"
+
+#: ../../src/gui/iconSelectWindow.vala:181
+msgid "Places"
+msgstr "Luoghi"
+
+#: ../../src/gui/iconSelectWindow.vala:182
+msgid "File types"
+msgstr "Tipi di file"
+
+#: ../../src/gui/iconSelectWindow.vala:183
+msgid "Emotes"
+msgstr ""
+
+#: ../../src/gui/iconSelectWindow.vala:184
+msgid "Miscellaneous"
+msgstr "Varie"
+
+#: ../../src/gui/iconSelectWindow.vala:257
+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:155 ../../src/utilities/key.vala:65
+#: ../../src/utilities/trigger.vala:216 ../../src/utilities/trigger.vala:217
+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:192 ../../src/utilities/trigger.vala:194
+#: ../../src/utilities/trigger.vala:196 ../../src/utilities/trigger.vala:200
+msgid "Turbo"
+msgstr "Turbo"
+
+#: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:196
+#: ../../src/utilities/trigger.vala:198 ../../src/utilities/trigger.vala:202
+msgid "Delayed"
+msgstr "Ritardato"
+
+#: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:194
+#: ../../src/utilities/trigger.vala:198 ../../src/utilities/trigger.vala:204
+msgid "Centered"
+msgstr ""
+
#: ../../src/pies/defaultConfig.vala:29
msgid "Multimedia"
msgstr "Multimedia"
@@ -38,13 +291,7 @@ msgstr "Traccia Precedente"
msgid "Play/Pause"
msgstr "Riproduci/Pausa"
-#: ../../src/pies/defaultConfig.vala:36
-#: ../../src/gui/iconSelectWindow.vala:197
-msgid "Applications"
-msgstr "Applicazioni"
-
#: ../../src/pies/defaultConfig.vala:45
-#: ../../src/actionGroups/bookmarkGroup.vala:35
msgid "Bookmarks"
msgstr "Segnalibri"
@@ -80,339 +327,320 @@ msgstr "Massimizza"
msgid "Restore"
msgstr "Ripristina"
-#: ../../src/actions/keyAction.vala:33
-msgid "Press hotkey"
-msgstr "Pressione di tasti"
-
-#: ../../src/actions/pieAction.vala:33
-msgid "Open Pie"
-msgstr "Apri una Torta"
+#: ../ui/icon_select.ui:8
+msgid "Select an icon"
+msgstr ""
-#: ../../src/actions/appAction.vala:33
-msgid "Launch application"
-msgstr "Lancia applicazione"
+#: ../ui/icon_select.ui:84
+msgid "Icon Theme"
+msgstr "Tema di icone"
-#: ../../src/actions/actionRegistry.vala:107
-msgid "Trash"
-msgstr "Cestino"
+#: ../ui/icon_select.ui:105
+msgid "Custom Icon"
+msgstr "Icona personalizzata"
-#: ../../src/actions/uriAction.vala:33
-msgid "Open URI"
-msgstr "Apri URI"
+#: ../ui/trigger_select.ui:8
+msgid "Activation Settings"
+msgstr ""
-#: ../../src/actionGroups/clipboardGroup.vala:63
-msgid "Clipboard"
-msgstr "Appunti"
+#: ../ui/trigger_select.ui:44
+msgid "It's possible to bind mouse buttons as well!"
+msgstr ""
-#: ../../src/actionGroups/devicesGroup.vala:34
-msgid "Devices"
-msgstr "Dispositivi"
+#: ../ui/trigger_select.ui:76
+msgid "Turbo mode"
+msgstr "Modalità turbo"
-#: ../../src/actionGroups/devicesGroup.vala:82
-msgid "Root"
-msgstr "Root"
+#: ../ui/trigger_select.ui:80
+msgid "If checked, the Pie will close when you release the chosen hot key."
+msgstr ""
+"Se selezionato, la Torta si chiuderà al rilascio della combinazione di tasti "
+"assegnata."
-#: ../../src/actionGroups/windowListGroup.vala:33
-msgid "Window List"
-msgstr "Elenco delle finestre"
+#: ../ui/trigger_select.ui:93
+msgid "Long press for activation"
+msgstr "Pressione prolungata per l'attivazione"
-#: ../../src/actionGroups/menuGroup.vala:34
-msgid "Main menu"
-msgstr "Menu principale"
+#: ../ui/trigger_select.ui:97
+msgid ""
+"If checked, the Pie will only open if you press this hot key a bit longer."
+msgstr ""
+"Se selezionato, la Torta si aprirà soltanto se si preme la combinazione di "
+"tasti un po' più a lungo."
-#: ../../src/actionGroups/sessionGroup.vala:34
-msgid "Session Control"
-msgstr "Controllo della sessione"
+#: ../ui/trigger_select.ui:110
+msgid "Open Pie centered on the screen"
+msgstr ""
-#: ../../src/actionGroups/sessionGroup.vala:52
-msgid "Shutdown"
-msgstr "Spegnimento"
+#: ../ui/trigger_select.ui:114
+#, 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."
-#: ../../src/actionGroups/sessionGroup.vala:55
-msgid "Logout"
-msgstr "Chiudi sessione"
+#: ../ui/trigger_select.ui:133
+msgid "<b>Activation options</b>"
+msgstr ""
-#: ../../src/actionGroups/sessionGroup.vala:58
-msgid "Reboot"
-msgstr "Riavvio"
+#: ../ui/settings.ui:8 ../ui/preferences.ui:27
+#, fuzzy
+msgid "General Settings"
+msgstr "Gnome-Pie - Impostazioni"
-#: ../../src/gui/iconSelectWindow.vala:160
-msgid "Choose an Icon"
-msgstr "Scegli un'icona"
+#: ../ui/settings.ui:47
+#, fuzzy
+msgid "Start Gnome-Pie on login"
+msgstr "Avvia al Login"
-#: ../../src/gui/iconSelectWindow.vala:196
-msgid "All icons"
-msgstr "Tutte le icone"
+#: ../ui/settings.ui:52 ../ui/settings.ui:53
+#, fuzzy
+msgid "If checked, Gnome-Pie will start silently everytime you log in."
+msgstr "Se selezionato, Gnome-Pie si avvierà all'accesso."
-#: ../../src/gui/iconSelectWindow.vala:198
-msgid "Actions"
-msgstr "Azioni"
+#: ../ui/settings.ui:66
+msgid "Display panel icon "
+msgstr ""
-#: ../../src/gui/iconSelectWindow.vala:199
-msgid "Places"
-msgstr "Luoghi"
+#: ../ui/settings.ui:71 ../ui/settings.ui:72
+msgid ""
+"If not checked, you can access this menu by launching Gnome-Pie a second "
+"time."
+msgstr ""
-#: ../../src/gui/iconSelectWindow.vala:200
-msgid "File types"
-msgstr "Tipi di file"
+#: ../ui/settings.ui:92
+#, fuzzy
+msgid "Global scale"
+msgstr "Scala globale"
-#: ../../src/gui/iconSelectWindow.vala:201
-msgid "Emotes"
+#: ../ui/settings.ui:130
+msgid "<b>Appearance and behavior</b>"
msgstr ""
-#: ../../src/gui/iconSelectWindow.vala:202
-msgid "Miscellaneous"
-msgstr "Varie"
+#: ../ui/slice_select.ui:8
+#, fuzzy
+msgid "Slice Options"
+msgstr "Applicazioni"
-#: ../../src/gui/iconSelectWindow.vala:279
-msgid "Icon Theme"
-msgstr "Tema di icone"
+#: ../ui/slice_select.ui:95
+msgid "There are no options for this Slice type."
+msgstr ""
-#: ../../src/gui/iconSelectWindow.vala:289
-msgid "All supported image formats"
-msgstr "Tutti i formati immagine supportati"
+#: ../ui/slice_select.ui:121
+msgid "Name of the Slice "
+msgstr ""
-#: ../../src/gui/iconSelectWindow.vala:311
-msgid "Custom Icon"
-msgstr "Icona personalizzata"
+#: ../ui/slice_select.ui:159
+msgid "URI to open"
+msgstr ""
+
+#: ../ui/slice_select.ui:197
+msgid "Command to execute"
+msgstr ""
-#: ../../src/gui/triggerSelectWindow.vala:69
-msgid "Define an open-command"
-msgstr "Definisci un comando di apertura"
+#: ../ui/slice_select.ui:235
+msgid "Hotkey to press"
+msgstr ""
-#: ../../src/gui/triggerSelectWindow.vala:87
-msgid "Click here if you want to bind a mouse button!"
-msgstr "Per assegnare un tasto del mouse clicca qui!"
+#: ../ui/slice_select.ui:264
+msgid "Pie to open"
+msgstr ""
-#: ../../src/gui/triggerSelectWindow.vala:102
-msgid "Turbo mode"
-msgstr "Modalità turbo"
+#: ../ui/slice_select.ui:293
+msgid "Is Quick Action"
+msgstr ""
-#: ../../src/gui/triggerSelectWindow.vala:103
-msgid "If checked, the Pie will close when you release the chosen hot key."
-msgstr "Se selezionato, la Torta si chiuderà al rilascio della combinazione di tasti assegnata."
+#: ../ui/slice_select.ui:306
+msgid "This Slice will be executed when you click in the middle of the Pie."
+msgstr ""
-#: ../../src/gui/triggerSelectWindow.vala:117
-msgid "Long press for activation"
-msgstr "Pressione prolungata per l'attivazione"
+#: ../ui/slice_select.ui:339
+msgid "<b>Slice options</b>"
+msgstr ""
-#: ../../src/gui/triggerSelectWindow.vala:118
-msgid "If checked, the Pie will only open if you press this hot key a bit longer."
-msgstr "Se selezionato, la Torta si aprirà soltanto se si preme la combinazione di tasti un po' più a lungo."
+#: ../ui/preferences.ui:8
+#, fuzzy
+msgid "Gnome-Pie Settings"
+msgstr "Gnome-Pie - Impostazioni"
-#: ../../src/gui/triggerSelectWindow.vala:158
+#: ../ui/preferences.ui:261
msgid ""
-"This hotkey is already assigned to the pie \"%s\"! \n"
+"<b><big>This Pie is empty!</big>\n"
"\n"
-"Please select another one or cancel your selection."
-msgstr ""
-"Questa combinazione di tasti è stata già assegnata alla Torta \"%s\"! \n"
+"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... \n"
"\n"
-"Selezionane un'altra oppure annulla la tua selezione per favore."
-
-#: ../../src/gui/triggerSelectWindow.vala:199
-msgid "It possible to make your system unusable if you bind a Pie to your left mouse button. Do you really want to do this?"
-msgstr "E' possibile rendere il tuo sistema inutilizzabile se assegni alla Torta il tasto sinistro del mouse. Vuoi davvero procedere?"
-
-#: ../../src/gui/themeList.vala:88
-msgid "by"
-msgstr "di"
-
-#: ../../src/gui/pieList.vala:88
-#: ../../src/gui/pieList.vala:851
-msgid "Slice group"
-msgstr "Gruppo di Fette"
-
-#: ../../src/gui/pieList.vala:135
-msgid "Icon"
-msgstr "Icona"
-
-#: ../../src/gui/pieList.vala:200
-msgid "Command"
-msgstr "Comando"
-
-#: ../../src/gui/pieList.vala:301
-#: ../../src/gui/pieList.vala:707
-#: ../../src/gui/pieList.vala:867
-#: ../../src/utilities/bindingManager.vala:156
-#: ../../src/utilities/trigger.vala:197
-#: ../../src/utilities/trigger.vala:198
-msgid "Not bound"
-msgstr "Non assegnato"
-
-#: ../../src/gui/pieList.vala:366
-msgid "Pie-ID / Action type"
-msgstr "ID Torta / Tipo di azione"
-
-#: ../../src/gui/pieList.vala:427
-msgid "Name"
-msgstr "Nome"
+"For manual and advanced configuration click on the plus sign."
+msgstr ""
-#: ../../src/gui/pieList.vala:470
-msgid "Add new Pie"
-msgstr "Aggiungi nuova Torta"
+#: ../ui/preferences.ui:282
+msgid ""
+"<b><big>You have no Pies!</big>\n"
+"\n"
+"Start by creating one! </b> This can be done by clicking on the tiny little "
+"plus sign in the lower left corner."
+msgstr ""
-#: ../../src/gui/pieList.vala:475
-msgid "Add new Slice"
-msgstr "Aggiungi nuova Fetta"
+#: ../ui/rename_pie.ui:6
+#, fuzzy
+msgid "Rename a Pie"
+msgstr "Apri una Torta"
-#: ../../src/gui/pieList.vala:483
-msgid "Delete"
-msgstr "Elimina"
+#~ msgid "Choose an Icon"
+#~ msgstr "Scegli un'icona"
-#: ../../src/gui/pieList.vala:619
-msgid "New Pie"
-msgstr "Nuova Torta"
+#~ msgid "Define an open-command"
+#~ msgstr "Definisci un comando di apertura"
-#: ../../src/gui/pieList.vala:666
-msgid "New Action"
-msgstr "Nuova Azione"
+#~ msgid "Click here if you want to bind a mouse button!"
+#~ msgstr "Per assegnare un tasto del mouse clicca qui!"
-#: ../../src/gui/pieList.vala:680
-msgid "You have to select a Pie to add a Slice to!"
-msgstr "Devi selezionare una Torta alla quale aggiungere una Fetta!"
+#~ msgid ""
+#~ "It possible to make your system unusable if you bind a Pie to your left "
+#~ "mouse button. Do you really want to do this?"
+#~ msgstr ""
+#~ "E' possibile rendere il tuo sistema inutilizzabile se assegni alla Torta "
+#~ "il tasto sinistro del mouse. Vuoi davvero procedere?"
-#: ../../src/gui/pieList.vala:730
-msgid "You have to select a Pie or a Slice to delete!"
-msgstr "Devi selezionare una Torta o una Fetta da eliminare!"
+#~ msgid "by"
+#~ msgstr "di"
-#: ../../src/gui/pieList.vala:741
-msgid "Do you really want to delete the selected Pie with all contained Slices?"
-msgstr "Vuoi davvero eliminare la Torta selezionata e tutte le Fette che contiene?"
+#~ msgid "Slice group"
+#~ msgstr "Gruppo di Fette"
-#: ../../src/gui/pieList.vala:775
-msgid "Do you really want to delete the selected Slice?"
-msgstr "Vuoi davvero eliminare la Fetta selezionata?"
+#~ msgid "Icon"
+#~ msgstr "Icona"
-#: ../../src/gui/preferences.vala:32
-msgid "Gnome-Pie - Settings"
-msgstr "Gnome-Pie - Impostazioni"
+#~ msgid "Command"
+#~ msgstr "Comando"
-#: ../../src/gui/preferences.vala:55
-msgid "Behavior"
-msgstr "Comportamento"
+#~ msgid "Pie-ID / Action type"
+#~ msgstr "ID Torta / Tipo di azione"
-#: ../../src/gui/preferences.vala:65
-msgid "Startup on Login"
-msgstr "Avvia al Login"
+#~ msgid "Name"
+#~ msgstr "Nome"
-#: ../../src/gui/preferences.vala:66
-msgid "If checked, Gnome-Pie will start when you log in."
-msgstr "Se selezionato, Gnome-Pie si avvierà all'accesso."
+#~ msgid "Add new Pie"
+#~ msgstr "Aggiungi nuova Torta"
-#: ../../src/gui/preferences.vala:72
-msgid "Show Indicator"
-msgstr "Mostra indicatore"
+#~ msgid "Delete"
+#~ msgstr "Elimina"
-#: ../../src/gui/preferences.vala:73
-msgid "If checked, an indicator for easy access of the settings menu is shown in your panel."
-msgstr "Se selezionato, il pannello di sistema mostrerà un indicatore per l'accesso rapido al menu di configurazione."
+#~ msgid "New Action"
+#~ msgstr "Nuova Azione"
-#: ../../src/gui/preferences.vala:79
-msgid "Open Pies at Mouse"
-msgstr "Apri Torte dal cursore"
+#~ msgid "You have to select a Pie to add a Slice to!"
+#~ msgstr "Devi selezionare una Torta alla quale aggiungere una Fetta!"
-#: ../../src/gui/preferences.vala:80
-msgid "If checked, pies will open at your pointer. Otherwise they'll pop up in the middle of the screen."
-msgstr "Se selezionato le Torte si apriranno dal cursore, altrimenti compariranno al centro dello schermo."
+#~ msgid "You have to select a Pie or a Slice to delete!"
+#~ msgstr "Devi selezionare una Torta o una Fetta da eliminare!"
-#: ../../src/gui/preferences.vala:89
-msgid "Global Scale"
-msgstr "Scala globale"
+#~ msgid "Behavior"
+#~ msgstr "Comportamento"
-#: ../../src/gui/preferences.vala:126
-msgid "Themes"
-msgstr "Temi"
+#~ msgid "Show Indicator"
+#~ msgstr "Mostra indicatore"
-#: ../../src/gui/preferences.vala:144
-msgid "General"
-msgstr "Generale"
-
-#: ../../src/gui/preferences.vala:149
-msgid "Pies"
-msgstr "Torte"
-
-#: ../../src/gui/preferences.vala:173
-msgid "You can right-click in the list for adding or removing entries."
-msgstr "Puoi cliccare col tasto destro sulla lista per aggiungere o rimuovere voci."
+#~ msgid ""
+#~ "If checked, an indicator for easy access of the settings menu is shown in "
+#~ "your panel."
+#~ msgstr ""
+#~ "Se selezionato, il pannello di sistema mostrerà un indicatore per "
+#~ "l'accesso rapido al menu di configurazione."
-#: ../../src/gui/preferences.vala:174
-msgid "You can reset Gnome-Pie to its default options with the terminal command \"gnome-pie --reset\"."
-msgstr "Puoi resettare Gnome-Pie alla configurazione predefinita con il comando da terminale \"gnome-pie --reset\"."
+#~ msgid "Open Pies at Mouse"
+#~ msgstr "Apri Torte dal cursore"
-#: ../../src/gui/preferences.vala:175
-msgid "The radiobutton at the beginning of each slice-line indicates the QuickAction of the pie."
-msgstr "Il pulsante di selezione all'inizio di ciascuna riga-fetta indica l'azione veloce (QuickAction) della Torta."
+#~ msgid ""
+#~ "If checked, pies will open at your pointer. Otherwise they'll pop up in "
+#~ "the middle of the screen."
+#~ msgstr ""
+#~ "Se selezionato le Torte si apriranno dal cursore, altrimenti compariranno "
+#~ "al centro dello schermo."
-#: ../../src/gui/preferences.vala:176
-msgid "Pies can be opened with the terminal command \"gnome-pie --open=ID\"."
-msgstr "Le Torte possono essere aperte col comando da terminale \"gnome-pie --open=ID\"."
+#~ msgid "General"
+#~ msgstr "Generale"
-#: ../../src/gui/preferences.vala:177
-msgid "Feel free to visit Gnome-Pie's homepage at %s!"
-msgstr "Sentiti libero di visitare la homepage di Gnome-Pie all'indirizzo %s!"
+#~ msgid "Pies"
+#~ msgstr "Torte"
-#: ../../src/gui/preferences.vala:178
-msgid "You can drag'n'drop applications from your main menu to the list above."
-msgstr "Puoi trascinare applicazioni nella lista sovrastante dal tuo menu principale."
+#~ msgid "You can right-click in the list for adding or removing entries."
+#~ msgstr ""
+#~ "Puoi cliccare col tasto destro sulla lista per aggiungere o rimuovere "
+#~ "voci."
-#: ../../src/gui/preferences.vala:179
-msgid "If you want to give some feedback, please write an e-mail to %s!"
-msgstr "Se vuoi inviarci dei feedback, per favore scrivi una e-mail a %s!"
+#~ msgid ""
+#~ "You can reset Gnome-Pie to its default options with the terminal command "
+#~ "\"gnome-pie --reset\"."
+#~ msgstr ""
+#~ "Puoi resettare Gnome-Pie alla configurazione predefinita con il comando "
+#~ "da terminale \"gnome-pie --reset\"."
-#: ../../src/gui/preferences.vala:180
-msgid "You may drag'n'drop URLs and bookmarks from your internet browser to the list above."
-msgstr "Puoi trascinare URLs e segnalibri nella lista sovrastante dal tuo internet browser."
+#~ msgid ""
+#~ "The radiobutton at the beginning of each slice-line indicates the "
+#~ "QuickAction of the pie."
+#~ msgstr ""
+#~ "Il pulsante di selezione all'inizio di ciascuna riga-fetta indica "
+#~ "l'azione veloce (QuickAction) della Torta."
-#: ../../src/gui/preferences.vala:181
-msgid "Bugs can be reported at %s!"
-msgstr "I bug possono essere segnalati su %s!"
+#~ msgid ""
+#~ "Pies can be opened with the terminal command \"gnome-pie --open=ID\"."
+#~ msgstr ""
+#~ "Le Torte possono essere aperte col comando da terminale \"gnome-pie --"
+#~ "open=ID\"."
-#: ../../src/gui/preferences.vala:182
-msgid "It's possible to drag'n'drop files and folders from your file browser to the list above."
-msgstr "E' possibile trascinare file e cartelle nella lista sovrastante dal tuo file browser."
+#~ msgid "Feel free to visit Gnome-Pie's homepage at %s!"
+#~ msgstr ""
+#~ "Sentiti libero di visitare la homepage di Gnome-Pie all'indirizzo %s!"
-#: ../../src/gui/preferences.vala:183
-msgid "It's recommended to keep your Pies small (at most 6-8 Slices). Else they will become hard to navigate."
-msgstr "E' consigliabile mantenere le tue Torte piccole (al più 6-8 Fette), altrimenti diventeranno difficili da navigare."
+#~ msgid ""
+#~ "You can drag'n'drop applications from your main menu to the list above."
+#~ msgstr ""
+#~ "Puoi trascinare applicazioni nella lista sovrastante dal tuo menu "
+#~ "principale."
-#: ../../src/gui/preferences.vala:184
-msgid "In order to create a launcher for a Pie, drag the Pie from the list to your desktop!"
-msgstr "Per creare un avviatore per una Torta, trascina la torta dalla lista al tuo dekstop!"
+#~ msgid "If you want to give some feedback, please write an e-mail to %s!"
+#~ msgstr "Se vuoi inviarci dei feedback, per favore scrivi una e-mail a %s!"
-#: ../../src/gui/preferences.vala:193
-msgid "Moves the selected Slice down"
-msgstr "Sposta in basso la Fetta selezionata"
+#~ msgid ""
+#~ "You may drag'n'drop URLs and bookmarks from your internet browser to the "
+#~ "list above."
+#~ msgstr ""
+#~ "Puoi trascinare URLs e segnalibri nella lista sovrastante dal tuo "
+#~ "internet browser."
-#: ../../src/gui/preferences.vala:205
-msgid "Moves the selected Slice up"
-msgstr "Sposta in alto la Fetta selezionata"
+#~ msgid "Bugs can be reported at %s!"
+#~ msgstr "I bug possono essere segnalati su %s!"
-#: ../../src/utilities/trigger.vala:152
-msgid "Button %i"
-msgstr "Tasto %i"
-
-#: ../../src/utilities/trigger.vala:155
-msgid "LeftButton"
-msgstr "Tasto sinistro"
+#~ msgid ""
+#~ "It's possible to drag'n'drop files and folders from your file browser to "
+#~ "the list above."
+#~ msgstr ""
+#~ "E' possibile trascinare file e cartelle nella lista sovrastante dal tuo "
+#~ "file browser."
-#: ../../src/utilities/trigger.vala:157
-msgid "RightButton"
-msgstr "Tasto destro"
+#~ msgid ""
+#~ "It's recommended to keep your Pies small (at most 6-8 Slices). Else they "
+#~ "will become hard to navigate."
+#~ msgstr ""
+#~ "E' consigliabile mantenere le tue Torte piccole (al più 6-8 Fette), "
+#~ "altrimenti diventeranno difficili da navigare."
-#: ../../src/utilities/trigger.vala:159
-msgid "MiddleButton"
-msgstr "Tasto centrale"
+#~ msgid ""
+#~ "In order to create a launcher for a Pie, drag the Pie from the list to "
+#~ "your desktop!"
+#~ msgstr ""
+#~ "Per creare un avviatore per una Torta, trascina la torta dalla lista al "
+#~ "tuo dekstop!"
-#: ../../src/utilities/trigger.vala:181
-#: ../../src/utilities/trigger.vala:183
-msgid "Turbo"
-msgstr "Turbo"
+#~ msgid "Moves the selected Slice down"
+#~ msgstr "Sposta in basso la Fetta selezionata"
-#: ../../src/utilities/trigger.vala:181
-#: ../../src/utilities/trigger.vala:185
-msgid "Delayed"
-msgstr "Ritardato"
+#~ 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 "
diff --git a/resources/locale/ko/LC_MESSAGES/gnomepie.mo b/resources/locale/ko/LC_MESSAGES/gnomepie.mo
index bd300bf..69e64b8 100644
--- a/resources/locale/ko/LC_MESSAGES/gnomepie.mo
+++ b/resources/locale/ko/LC_MESSAGES/gnomepie.mo
Binary files differ
diff --git a/resources/locale/ko/LC_MESSAGES/ko.po b/resources/locale/ko/LC_MESSAGES/ko.po
index 54c27e3..7339372 100644
--- a/resources/locale/ko/LC_MESSAGES/ko.po
+++ b/resources/locale/ko/LC_MESSAGES/ko.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnomepie 0.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-11-15 02:49+0900\n"
+"POT-Creation-Date: 2012-01-19 20:25+0100\n"
"PO-Revision-Date: 2011-11-15 03:15+0900\n"
"Last-Translator: Kim Boram <Boramism@gmail.com>\n"
"Language-Team: Korean\n"
@@ -17,26 +17,258 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#: ../../src/actions/actionRegistry.vala:107
-msgid "Trash"
-msgstr "휴지통"
-
-#: ../../src/actions/keyAction.vala:33
+#: ../../src/actions/keyAction.vala:34
msgid "Press hotkey"
msgstr "단축키를 누르세요"
-#: ../../src/actions/appAction.vala:33
+#: ../../src/actions/keyAction.vala:36
+msgid "Simulates the activation of a hotkey."
+msgstr ""
+
+#: ../../src/actions/appAction.vala:34
msgid "Launch application"
msgstr "프로그램 실행"
-#: ../../src/actions/pieAction.vala:33
-msgid "Open Pie"
-msgstr "파이 열기"
+#: ../../src/actions/appAction.vala:36
+msgid "Executes the given command."
+msgstr ""
-#: ../../src/actions/uriAction.vala:33
+#: ../../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:111
+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 ""
+
+#: ../../src/gui/triggerSelectWindow.vala:144
+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:145
+msgid "No Pie selected."
+msgstr ""
+
+#: ../../src/gui/preferencesWindow.vala:181
+msgid "New Pie"
+msgstr "새 파이"
+
+#: ../../src/gui/preferencesWindow.vala:190
+msgid ""
+"Do you really want to delete the selected Pie with all contained Slices?"
+msgstr "선택한 파이와 파이 안의 모든 조각을 삭제하시겠습니까?"
+
+#: ../../src/gui/newSliceWindow.vala:229
+msgid "Rename me!"
+msgstr ""
+
+#: ../../src/gui/piePreviewRenderer.vala:292
+msgid "Click to edit"
+msgstr ""
+
+#: ../../src/gui/piePreviewRenderer.vala:292
+#: ../../src/gui/piePreviewRenderer.vala:307
+msgid "Drag to move"
+msgstr ""
+
+#: ../../src/gui/piePreviewRenderer.vala:295
+#, fuzzy
+msgid "Click to add a new Slice"
+msgstr "새 조각 추가"
+
+#: ../../src/gui/piePreviewRenderer.vala:299
+#, fuzzy
+msgid "Drop to add as new Slice"
+msgstr "새 조각 추가"
+
+#: ../../src/gui/piePreviewRenderer.vala:302
+msgid "Drop to move Slice"
+msgstr ""
+
+#: ../../src/gui/piePreviewRenderer.vala:307
+msgid "Click to delete"
+msgstr ""
+
+#: ../../src/gui/triggerSelectButton.vala:59
+#, fuzzy
+msgid "Press a hotkey ..."
+msgstr "단축키를 누르세요"
+
+#: ../../src/gui/piePreview.vala:120
+#, fuzzy
+msgid "Do you really want to delete this Slice?"
+msgstr "정말 선택한 조각을 삭제하시겠습니까?"
+
+#: ../../src/gui/themeList.vala:48
+msgid "Themes"
+msgstr "테마"
+
+#: ../../src/gui/themeList.vala:80
+msgid "By"
+msgstr ""
+
+#: ../../src/gui/sliceTypeList.vala:56
+#, fuzzy
+msgid "Slice types"
+msgstr "파일 형식"
+
+#: ../../src/gui/iconSelectWindow.vala:178
+msgid "All icons"
+msgstr "모든 아이콘"
+
+#: ../../src/gui/iconSelectWindow.vala:179
+#: ../../src/pies/defaultConfig.vala:36
+msgid "Applications"
+msgstr "프로그램"
+
+#: ../../src/gui/iconSelectWindow.vala:180
+msgid "Actions"
+msgstr "동작"
+
+#: ../../src/gui/iconSelectWindow.vala:181
+msgid "Places"
+msgstr "위치"
+
+#: ../../src/gui/iconSelectWindow.vala:182
+msgid "File types"
+msgstr "파일 형식"
+
+#: ../../src/gui/iconSelectWindow.vala:183
+msgid "Emotes"
+msgstr "감정"
+
+#: ../../src/gui/iconSelectWindow.vala:184
+msgid "Miscellaneous"
+msgstr "기타"
+
+#: ../../src/gui/iconSelectWindow.vala:257
+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 ""
+
+#: ../../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 ""
+
+#: ../../src/actionGroups/devicesGroup.vala:85
+msgid "Root"
+msgstr "루트"
+
+#: ../../src/utilities/bindingManager.vala:155 ../../src/utilities/key.vala:65
+#: ../../src/utilities/trigger.vala:216 ../../src/utilities/trigger.vala:217
+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:192 ../../src/utilities/trigger.vala:194
+#: ../../src/utilities/trigger.vala:196 ../../src/utilities/trigger.vala:200
+msgid "Turbo"
+msgstr "터보"
+
+#: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:196
+#: ../../src/utilities/trigger.vala:198 ../../src/utilities/trigger.vala:202
+msgid "Delayed"
+msgstr "시간 지연"
+
+#: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:194
+#: ../../src/utilities/trigger.vala:198 ../../src/utilities/trigger.vala:204
+msgid "Centered"
+msgstr ""
+
#: ../../src/pies/defaultConfig.vala:29
msgid "Multimedia"
msgstr "멀티미디어"
@@ -57,13 +289,7 @@ msgstr "이전 트랙"
msgid "Play/Pause"
msgstr "재생/일시 정지"
-#: ../../src/pies/defaultConfig.vala:36
-#: ../../src/gui/iconSelectWindow.vala:197
-msgid "Applications"
-msgstr "프로그램"
-
#: ../../src/pies/defaultConfig.vala:45
-#: ../../src/actionGroups/bookmarkGroup.vala:35
msgid "Bookmarks"
msgstr "책갈피"
@@ -99,317 +325,299 @@ msgstr "최대화"
msgid "Restore"
msgstr "복구"
-#: ../../src/gui/iconSelectWindow.vala:160
-msgid "Choose an Icon"
-msgstr "아이콘 선택"
-
-#: ../../src/gui/iconSelectWindow.vala:196
-msgid "All icons"
-msgstr "모든 아이콘"
-
-#: ../../src/gui/iconSelectWindow.vala:198
-msgid "Actions"
-msgstr "동작"
-
-#: ../../src/gui/iconSelectWindow.vala:199
-msgid "Places"
-msgstr "위치"
-
-#: ../../src/gui/iconSelectWindow.vala:200
-msgid "File types"
-msgstr "파일 형식"
-
-#: ../../src/gui/iconSelectWindow.vala:201
-msgid "Emotes"
-msgstr "감정"
-
-#: ../../src/gui/iconSelectWindow.vala:202
-msgid "Miscellaneous"
-msgstr "기타"
+#: ../ui/icon_select.ui:8
+msgid "Select an icon"
+msgstr ""
-#: ../../src/gui/iconSelectWindow.vala:279
+#: ../ui/icon_select.ui:84
msgid "Icon Theme"
msgstr "아이콘 테마"
-#: ../../src/gui/iconSelectWindow.vala:289
-msgid "All supported image formats"
-msgstr "지원하는 모든 이미지 형식"
-
-#: ../../src/gui/iconSelectWindow.vala:311
+#: ../ui/icon_select.ui:105
msgid "Custom Icon"
msgstr "사용자 설정 아이콘"
-#: ../../src/gui/preferences.vala:32
-msgid "Gnome-Pie - Settings"
-msgstr "그놈 파이 설정"
+#: ../ui/trigger_select.ui:8
+msgid "Activation Settings"
+msgstr ""
-#: ../../src/gui/preferences.vala:55
-msgid "Behavior"
-msgstr "행동"
+#: ../ui/trigger_select.ui:44
+msgid "It's possible to bind mouse buttons as well!"
+msgstr ""
-#: ../../src/gui/preferences.vala:65
-msgid "Startup on Login"
-msgstr "로그인할 때 시작"
+#: ../ui/trigger_select.ui:76
+msgid "Turbo mode"
+msgstr "터보 모드"
-#: ../../src/gui/preferences.vala:66
-msgid "If checked, Gnome-Pie will start when you log in."
-msgstr "선택하면 그놈 파이가 로그인할 때 자동으로 시작합니다."
+#: ../ui/trigger_select.ui:80
+msgid "If checked, the Pie will close when you release the chosen hot key."
+msgstr "선택하면 누른 키보드 바로가기를 떼면 파이를 닫습니다."
-#: ../../src/gui/preferences.vala:72
-msgid "Show Indicator"
-msgstr "알리미 보이기"
+#: ../ui/trigger_select.ui:93
+msgid "Long press for activation"
+msgstr "활성화 하려면 길게 누르세요"
-#: ../../src/gui/preferences.vala:73
-msgid "If checked, an indicator for easy access of the settings menu is shown in your panel."
-msgstr "선택하면 설정 메뉴에 쉽게 접근할 수 있도록 패널에 알리미를 표시합니다."
+#: ../ui/trigger_select.ui:97
+msgid ""
+"If checked, the Pie will only open if you press this hot key a bit longer."
+msgstr "선택하면 파이를 단축키를 길게 누를 때만 엽니다."
-#: ../../src/gui/preferences.vala:79
-msgid "Open Pies at Mouse"
-msgstr "마우스로 파이 열기"
+#: ../ui/trigger_select.ui:110
+msgid "Open Pie centered on the screen"
+msgstr ""
-#: ../../src/gui/preferences.vala:80
-msgid "If checked, pies will open at your pointer. Otherwise they'll pop up in the middle of the screen."
-msgstr "선택하면 포인터가 있는 곳에 파이가 열립니다. 그렇지 않으면 화면의 가운데에 나타납니다."
+#: ../ui/trigger_select.ui:114
+#, fuzzy
+msgid ""
+"If checked, the Pie will open in the middle of your screen. Else it will pop "
+"up at your pointer."
+msgstr "선택하면 파이를 단축키를 길게 누를 때만 엽니다."
-#: ../../src/gui/preferences.vala:89
-msgid "Global Scale"
-msgstr "전체 크기 조정"
+#: ../ui/trigger_select.ui:133
+msgid "<b>Activation options</b>"
+msgstr ""
-#: ../../src/gui/preferences.vala:126
-msgid "Themes"
-msgstr "테마"
+#: ../ui/settings.ui:8 ../ui/preferences.ui:27
+#, fuzzy
+msgid "General Settings"
+msgstr "그놈 파이 설정"
+
+#: ../ui/settings.ui:47
+#, fuzzy
+msgid "Start Gnome-Pie on login"
+msgstr "로그인할 때 시작"
-#: ../../src/gui/preferences.vala:144
-msgid "General"
-msgstr "일반"
+#: ../ui/settings.ui:52 ../ui/settings.ui:53
+#, fuzzy
+msgid "If checked, Gnome-Pie will start silently everytime you log in."
+msgstr "선택하면 그놈 파이가 로그인할 때 자동으로 시작합니다."
-#: ../../src/gui/preferences.vala:149
-msgid "Pies"
-msgstr "파이"
+#: ../ui/settings.ui:66
+msgid "Display panel icon "
+msgstr ""
-#: ../../src/gui/preferences.vala:173
-msgid "You can right-click in the list for adding or removing entries."
-msgstr "항목을 추가 또는 제거하려면 목록에서 오른쪽 단추를 누르세요."
+#: ../ui/settings.ui:71 ../ui/settings.ui:72
+msgid ""
+"If not checked, you can access this menu by launching Gnome-Pie a second "
+"time."
+msgstr ""
-#: ../../src/gui/preferences.vala:174
-msgid "You can reset Gnome-Pie to its default options with the terminal command \"gnome-pie --reset\"."
-msgstr "터미널에서 \"gnome-pie --reset\" 명령을 입혁하면 그놈 파이를 기본 설정으로 되돌릴 수 있습니다."
+#: ../ui/settings.ui:92
+#, fuzzy
+msgid "Global scale"
+msgstr "전체 크기 조정"
-#: ../../src/gui/preferences.vala:175
-msgid "The radiobutton at the beginning of each slice-line indicates the QuickAction of the pie."
-msgstr "각 조각 선의 시작 지점에 있는 선택 단추는 파이의 빠른 동작을 의미합니다."
+#: ../ui/settings.ui:130
+msgid "<b>Appearance and behavior</b>"
+msgstr ""
-#: ../../src/gui/preferences.vala:176
-msgid "Pies can be opened with the terminal command \"gnome-pie --open=ID\"."
-msgstr "터미널에서 \"gnome-pie --open=ID\" 명령을 입력하면 파이를 열 수 있습니다."
+#: ../ui/slice_select.ui:8
+#, fuzzy
+msgid "Slice Options"
+msgstr "프로그램"
-#: ../../src/gui/preferences.vala:177
-msgid "Feel free to visit Gnome-Pie's homepage at %s!"
-msgstr "편하게 그놈 파이 홈페이지 %s에 방문하십시오!"
+#: ../ui/slice_select.ui:95
+msgid "There are no options for this Slice type."
+msgstr ""
-#: ../../src/gui/preferences.vala:178
-msgid "You can drag'n'drop applications from your main menu to the list above."
-msgstr "주 메뉴에서 위 목록으로 프로그램을 끌어 놓을 수 있습니다."
+#: ../ui/slice_select.ui:121
+msgid "Name of the Slice "
+msgstr ""
-#: ../../src/gui/preferences.vala:179
-msgid "If you want to give some feedback, please write an e-mail to %s!"
-msgstr "파드백을 주시려면 주소 %s(으)로 전자 메일을 써주십시오."
+#: ../ui/slice_select.ui:159
+msgid "URI to open"
+msgstr ""
-#: ../../src/gui/preferences.vala:180
-msgid "You may drag'n'drop URLs and bookmarks from your internet browser to the list above."
-msgstr "인터넷 브라우저에서 위 목록으로 인터넷 주소와 책갈피를 끌어 놓을 수 있습니다."
+#: ../ui/slice_select.ui:197
+msgid "Command to execute"
+msgstr ""
-#: ../../src/gui/preferences.vala:181
-msgid "Bugs can be reported at %s!"
-msgstr "버그는 %s에서 보고할 수 있습니다!"
+#: ../ui/slice_select.ui:235
+msgid "Hotkey to press"
+msgstr ""
-#: ../../src/gui/preferences.vala:182
-msgid "It's possible to drag'n'drop files and folders from your file browser to the list above."
-msgstr "파일 관리자에서 위 목록으로 파일과 폴더를 끌어 놓을 수 있습니다."
+#: ../ui/slice_select.ui:264
+msgid "Pie to open"
+msgstr ""
-#: ../../src/gui/preferences.vala:183
-msgid "It's recommended to keep your Pies small (at most 6-8 Slices). Else they will become hard to navigate."
-msgstr "파이를 작게 (최대 6-8 조각) 유지하십시오. 그렇지 않으면 찾기 힘들 수 있습니다."
+#: ../ui/slice_select.ui:293
+msgid "Is Quick Action"
+msgstr ""
-#: ../../src/gui/preferences.vala:184
-msgid "In order to create a launcher for a Pie, drag the Pie from the list to your desktop!"
-msgstr "파이 실행 아이콘을 만드려면 데스크톱 목록에서 파이로 끌어 놓으세요!"
+#: ../ui/slice_select.ui:306
+msgid "This Slice will be executed when you click in the middle of the Pie."
+msgstr ""
-#: ../../src/gui/preferences.vala:193
-msgid "Moves the selected Slice down"
-msgstr "선택한 조각을 아래로 옮기기"
+#: ../ui/slice_select.ui:339
+msgid "<b>Slice options</b>"
+msgstr ""
-#: ../../src/gui/preferences.vala:205
-msgid "Moves the selected Slice up"
-msgstr "선택한 조각을 위로 옮기기"
+#: ../ui/preferences.ui:8
+#, fuzzy
+msgid "Gnome-Pie Settings"
+msgstr "그놈 파이 설정"
-#: ../../src/gui/triggerSelectWindow.vala:69
-msgid "Define an open-command"
-msgstr "열기 명령 정의"
+#: ../ui/preferences.ui:261
+msgid ""
+"<b><big>This Pie is empty!</big>\n"
+"\n"
+"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... \n"
+"\n"
+"For manual and advanced configuration click on the plus sign."
+msgstr ""
-#: ../../src/gui/triggerSelectWindow.vala:87
-msgid "Click here if you want to bind a mouse button!"
-msgstr "마우스 단추를 묶으려면 클릭하십시오!"
+#: ../ui/preferences.ui:282
+msgid ""
+"<b><big>You have no Pies!</big>\n"
+"\n"
+"Start by creating one! </b> This can be done by clicking on the tiny little "
+"plus sign in the lower left corner."
+msgstr ""
-#: ../../src/gui/triggerSelectWindow.vala:102
-msgid "Turbo mode"
-msgstr "터보 모드"
+#: ../ui/rename_pie.ui:6
+#, fuzzy
+msgid "Rename a Pie"
+msgstr "파이 열기"
-#: ../../src/gui/triggerSelectWindow.vala:103
-msgid "If checked, the Pie will close when you release the chosen hot key."
-msgstr "선택하면 누른 키보드 바로가기를 떼면 파이를 닫습니다."
+#~ msgid "Choose an Icon"
+#~ msgstr "아이콘 선택"
+
+#~ msgid "Behavior"
+#~ 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 "마우스로 파이 열기"
-#: ../../src/gui/triggerSelectWindow.vala:117
-msgid "Long press for activation"
-msgstr "활성화 하려면 길게 누르세요"
+#~ msgid ""
+#~ "If checked, pies will open at your pointer. Otherwise they'll pop up in "
+#~ "the middle of the screen."
+#~ msgstr ""
+#~ "선택하면 포인터가 있는 곳에 파이가 열립니다. 그렇지 않으면 화면의 가운데"
+#~ "에 나타납니다."
-#: ../../src/gui/triggerSelectWindow.vala:118
-msgid "If checked, the Pie will only open if you press this hot key a bit longer."
-msgstr "선택하면 파이를 단축키를 길게 누를 때만 엽니다."
+#~ msgid "General"
+#~ msgstr "일반"
-#: ../../src/gui/triggerSelectWindow.vala:156
-msgid ""
-"This hotkey is already assigned to the pie \"%s\"! \n"
-"\n"
-"Please select another one or cancel your selection."
-msgstr ""
-"이 단축키는 이미 \"%s\" 파이에 할당했습니다!\n"
-"\n"
-"다른 것을 선택하거나 선택을 취소하십시오."
+#~ msgid "Pies"
+#~ msgstr "파이"
-#: ../../src/gui/triggerSelectWindow.vala:197
-msgid "It possible to make your system unusable if you bind a Pie to your left mouse button. Do you really want to do this?"
-msgstr "파이를 마우스 왼쪽 단추에 연결하면 시스템을 사용하지 못하게 될 수 있습니다. 정말 계속하시겠습니까?"
-
-#: ../../src/gui/themeList.vala:88
-msgid "by"
-msgstr "작성자"
-
-#: ../../src/gui/pieList.vala:88
-#: ../../src/gui/pieList.vala:851
-msgid "Slice group"
-msgstr "조각 그룹"
-
-#: ../../src/gui/pieList.vala:135
-msgid "Icon"
-msgstr "아이콘"
-
-#: ../../src/gui/pieList.vala:200
-msgid "Command"
-msgstr "명령"
-
-#: ../../src/gui/pieList.vala:301
-#: ../../src/gui/pieList.vala:707
-#: ../../src/gui/pieList.vala:867
-#: ../../src/utilities/trigger.vala:197
-#: ../../src/utilities/trigger.vala:198
-#: ../../src/utilities/bindingManager.vala:156
-msgid "Not bound"
-msgstr "연결하지 않음"
+#~ msgid "You can right-click in the list for adding or removing entries."
+#~ msgstr "항목을 추가 또는 제거하려면 목록에서 오른쪽 단추를 누르세요."
-#: ../../src/gui/pieList.vala:366
-msgid "Pie-ID / Action type"
-msgstr "파이 ID / 동작 형식"
+#~ msgid ""
+#~ "You can reset Gnome-Pie to its default options with the terminal command "
+#~ "\"gnome-pie --reset\"."
+#~ msgstr ""
+#~ "터미널에서 \"gnome-pie --reset\" 명령을 입혁하면 그놈 파이를 기본 설정으"
+#~ "로 되돌릴 수 있습니다."
-#: ../../src/gui/pieList.vala:427
-msgid "Name"
-msgstr "이름"
+#~ msgid ""
+#~ "The radiobutton at the beginning of each slice-line indicates the "
+#~ "QuickAction of the pie."
+#~ msgstr ""
+#~ "각 조각 선의 시작 지점에 있는 선택 단추는 파이의 빠른 동작을 의미합니다."
-#: ../../src/gui/pieList.vala:470
-msgid "Add new Pie"
-msgstr "새 파이 추가"
+#~ msgid ""
+#~ "Pies can be opened with the terminal command \"gnome-pie --open=ID\"."
+#~ msgstr ""
+#~ "터미널에서 \"gnome-pie --open=ID\" 명령을 입력하면 파이를 열 수 있습니다."
-#: ../../src/gui/pieList.vala:475
-msgid "Add new Slice"
-msgstr "새 조각 추가"
+#~ msgid "Feel free to visit Gnome-Pie's homepage at %s!"
+#~ msgstr "편하게 그놈 파이 홈페이지 %s에 방문하십시오!"
-#: ../../src/gui/pieList.vala:483
-msgid "Delete"
-msgstr "삭제"
+#~ msgid ""
+#~ "You can drag'n'drop applications from your main menu to the list above."
+#~ msgstr "주 메뉴에서 위 목록으로 프로그램을 끌어 놓을 수 있습니다."
-#: ../../src/gui/pieList.vala:619
-msgid "New Pie"
-msgstr "새 파이"
+#~ msgid "If you want to give some feedback, please write an e-mail to %s!"
+#~ msgstr "파드백을 주시려면 주소 %s(으)로 전자 메일을 써주십시오."
-#: ../../src/gui/pieList.vala:666
-msgid "New Action"
-msgstr "새 동작"
+#~ msgid ""
+#~ "You may drag'n'drop URLs and bookmarks from your internet browser to the "
+#~ "list above."
+#~ msgstr ""
+#~ "인터넷 브라우저에서 위 목록으로 인터넷 주소와 책갈피를 끌어 놓을 수 있습니"
+#~ "다."
-#: ../../src/gui/pieList.vala:680
-msgid "You have to select a Pie to add a Slice to!"
-msgstr "조각을 추가할 파이를 선택해야 합니다!"
+#~ msgid "Bugs can be reported at %s!"
+#~ msgstr "버그는 %s에서 보고할 수 있습니다!"
-#: ../../src/gui/pieList.vala:730
-msgid "You have to select a Pie or a Slice to delete!"
-msgstr "삭제하고 싶은 파이와 조각을 선택해야 합니다!"
+#~ msgid ""
+#~ "It's possible to drag'n'drop files and folders from your file browser to "
+#~ "the list above."
+#~ msgstr "파일 관리자에서 위 목록으로 파일과 폴더를 끌어 놓을 수 있습니다."
-#: ../../src/gui/pieList.vala:741
-msgid "Do you really want to delete the selected Pie with all contained Slices?"
-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 조각) 유지하십시오. 그렇지 않으면 찾기 힘들 수 있습"
+#~ "니다."
-#: ../../src/gui/pieList.vala:775
-msgid "Do you really want to delete the selected Slice?"
-msgstr "정말 선택한 조각을 삭제하시겠습니까?"
+#~ msgid ""
+#~ "In order to create a launcher for a Pie, drag the Pie from the list to "
+#~ "your desktop!"
+#~ msgstr "파이 실행 아이콘을 만드려면 데스크톱 목록에서 파이로 끌어 놓으세요!"
-#: ../../src/utilities/trigger.vala:152
-msgid "Button %i"
-msgstr "%i 단추"
+#~ msgid "Moves the selected Slice down"
+#~ msgstr "선택한 조각을 아래로 옮기기"
-#: ../../src/utilities/trigger.vala:155
-msgid "LeftButton"
-msgstr "왼쪽 단추"
+#~ msgid "Moves the selected Slice up"
+#~ msgstr "선택한 조각을 위로 옮기기"
-#: ../../src/utilities/trigger.vala:157
-msgid "RightButton"
-msgstr "오른쪽 단추"
+#~ msgid "Define an open-command"
+#~ msgstr "열기 명령 정의"
-#: ../../src/utilities/trigger.vala:159
-msgid "MiddleButton"
-msgstr "가운데 단추"
+#~ msgid "Click here if you want to bind a mouse button!"
+#~ msgstr "마우스 단추를 묶으려면 클릭하십시오!"
-#: ../../src/utilities/trigger.vala:181
-#: ../../src/utilities/trigger.vala:183
-msgid "Turbo"
-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 ""
+#~ "파이를 마우스 왼쪽 단추에 연결하면 시스템을 사용하지 못하게 될 수 있습니"
+#~ "다. 정말 계속하시겠습니까?"
-#: ../../src/utilities/trigger.vala:181
-#: ../../src/utilities/trigger.vala:185
-msgid "Delayed"
-msgstr "시간 지연"
+#~ msgid "by"
+#~ msgstr "작성자"
-#: ../../src/actionGroups/clipboardGroup.vala:63
-msgid "Clipboard"
-msgstr "클립보드"
+#~ msgid "Slice group"
+#~ msgstr "조각 그룹"
-#: ../../src/actionGroups/sessionGroup.vala:34
-msgid "Session Control"
-msgstr "세션 컨트롤"
+#~ msgid "Icon"
+#~ msgstr "아이콘"
-#: ../../src/actionGroups/sessionGroup.vala:57
-msgid "Shutdown"
-msgstr "시스템 끄기"
+#~ msgid "Command"
+#~ msgstr "명령"
-#: ../../src/actionGroups/sessionGroup.vala:60
-msgid "Logout"
-msgstr "로그아웃"
+#~ msgid "Pie-ID / Action type"
+#~ msgstr "파이 ID / 동작 형식"
-#: ../../src/actionGroups/sessionGroup.vala:63
-msgid "Reboot"
-msgstr "다시 시작"
+#~ msgid "Name"
+#~ msgstr "이름"
-#: ../../src/actionGroups/devicesGroup.vala:34
-msgid "Devices"
-msgstr "장치"
+#~ msgid "Add new Pie"
+#~ msgstr "새 파이 추가"
-#: ../../src/actionGroups/devicesGroup.vala:82
-msgid "Root"
-msgstr "루트"
+#~ msgid "Delete"
+#~ msgstr "삭제"
-#: ../../src/actionGroups/windowListGroup.vala:33
-msgid "Window List"
-msgstr "창 목록"
+#~ msgid "New Action"
+#~ msgstr "새 동작"
-#: ../../src/actionGroups/menuGroup.vala:34
-msgid "Main menu"
-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 "삭제하고 싶은 파이와 조각을 선택해야 합니다!"
diff --git a/resources/locale/pt-br/LC_MESSAGES/gnomepie.mo b/resources/locale/pt-br/LC_MESSAGES/gnomepie.mo
index 6c1ad52..7a60d1e 100644
--- a/resources/locale/pt-br/LC_MESSAGES/gnomepie.mo
+++ b/resources/locale/pt-br/LC_MESSAGES/gnomepie.mo
Binary files differ
diff --git a/resources/locale/pt-br/LC_MESSAGES/pt-br.mo b/resources/locale/pt-br/LC_MESSAGES/pt-br.mo
deleted file mode 100644
index 6c1ad52..0000000
--- a/resources/locale/pt-br/LC_MESSAGES/pt-br.mo
+++ /dev/null
Binary files differ
diff --git a/resources/locale/pt-br/LC_MESSAGES/pt-br.po b/resources/locale/pt-br/LC_MESSAGES/pt-br.po
index 500c02a..82faec4 100644
--- a/resources/locale/pt-br/LC_MESSAGES/pt-br.po
+++ b/resources/locale/pt-br/LC_MESSAGES/pt-br.po
@@ -7,44 +7,52 @@ msgid ""
msgstr ""
"Project-Id-Version: gnomepie 0.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-11-08 21:10-0200\n"
+"POT-Creation-Date: 2012-01-19 20:25+0100\n"
"PO-Revision-Date: 2011-11-08 21:49-0300\n"
"Last-Translator: Magnun Leno da Silva <magnun@codecommunity.org>\n"
"Language-Team: Language pt-br\n"
+"Language: pt-br\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: pt-br\n"
-#: ../../src/gui/themeList.vala:88
-msgid "by"
-msgstr "por"
+#: ../../src/actions/keyAction.vala:34
+msgid "Press hotkey"
+msgstr "Pressione a tecla de atalho"
-#: ../../src/gui/triggerSelectWindow.vala:69
-msgid "Define an open-command"
-msgstr "Definir um comando de abertura"
+#: ../../src/actions/keyAction.vala:36
+msgid "Simulates the activation of a hotkey."
+msgstr ""
-#: ../../src/gui/triggerSelectWindow.vala:87
-msgid "Click here if you want to bind a mouse button!"
-msgstr "Clique aqui para vincular um botão do mouse!"
+#: ../../src/actions/appAction.vala:34
+msgid "Launch application"
+msgstr "Lançar aplicação"
-#: ../../src/gui/triggerSelectWindow.vala:102
-msgid "Turbo mode"
-msgstr "Modo Turbo"
+#: ../../src/actions/appAction.vala:36
+msgid "Executes the given command."
+msgstr ""
-#: ../../src/gui/triggerSelectWindow.vala:103
-msgid "If checked, the Pie will close when you release the chosen hot key."
-msgstr "Se marcado, o Menu irá fechar quando o atalho for liberado."
+#: ../../src/actions/uriAction.vala:34
+msgid "Open URI"
+msgstr "Abrir URL"
-#: ../../src/gui/triggerSelectWindow.vala:117
-msgid "Long press for activation"
-msgstr "Clique longo para ativação"
+#: ../../src/actions/uriAction.vala:36
+msgid "Opens a given location. You may use URL's or files paths."
+msgstr ""
-#: ../../src/gui/triggerSelectWindow.vala:118
-msgid "If checked, the Pie will only open if you press this hot key a bit longer."
-msgstr "Se marcador, o Menu irá abrir somente se você pressionar este atalho por mais um tempo."
+#: ../../src/actions/actionRegistry.vala:111
+msgid "Trash"
+msgstr "Remover"
-#: ../../src/gui/triggerSelectWindow.vala:158
+#: ../../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 ""
+
+#: ../../src/gui/triggerSelectWindow.vala:144
msgid ""
"This hotkey is already assigned to the pie \"%s\"! \n"
"\n"
@@ -54,311 +62,212 @@ msgstr ""
"\n"
"Por favor escolha outro ou cancele sua seleção."
-#: ../../src/gui/triggerSelectWindow.vala:199
-msgid "It possible to make your system unusable if you bind a Pie to your left mouse button. Do you really want to do this?"
-msgstr "É possível tornar seu sistema inútil caso você vincule um Menu ao botão esquerdo do mouse. Você realmente quer fazer isso?"
-
-#: ../../src/gui/preferences.vala:32
-msgid "Gnome-Pie - Settings"
-msgstr "Gnome-Pie - Configurações"
-
-#: ../../src/gui/preferences.vala:55
-msgid "Behavior"
-msgstr "Comportamento"
-
-#: ../../src/gui/preferences.vala:65
-msgid "Startup on Login"
-msgstr "Iniciar durante o Login"
-
-#: ../../src/gui/preferences.vala:66
-msgid "If checked, Gnome-Pie will start when you log in."
-msgstr "Se marcado, o Gnome-Pie irá iniciar durante o login."
-
-#: ../../src/gui/preferences.vala:72
-msgid "Show Indicator"
-msgstr "Mostrar Indicador"
-
-#: ../../src/gui/preferences.vala:73
-msgid "If checked, an indicator for easy access of the settings menu is shown in your panel."
-msgstr "Se marcado, um indicador para facilitar o acesso às configurações estará disponível em seu painel."
-
-#: ../../src/gui/preferences.vala:79
-msgid "Open Pies at Mouse"
-msgstr "Abrir Menus sobre o Mouse"
-
-#: ../../src/gui/preferences.vala:80
-msgid "If checked, pies will open at your pointer. Otherwise they'll pop up in the middle of the screen."
-msgstr "Se marcado, os menus não irão abrir sob o ponteiro. Ao invés disso eles abrirão no meio da sua tela."
-
-#: ../../src/gui/preferences.vala:89
-msgid "Global Scale"
-msgstr "Escalonamento Global"
+#: ../../src/gui/preferencesWindow.vala:145
+msgid "No Pie selected."
+msgstr ""
-#: ../../src/gui/preferences.vala:126
-msgid "Themes"
-msgstr "Temas"
+#: ../../src/gui/preferencesWindow.vala:181
+msgid "New Pie"
+msgstr "Novo Menu"
-#: ../../src/gui/preferences.vala:144
-msgid "General"
-msgstr "Geral"
-
-#: ../../src/gui/preferences.vala:149
-msgid "Pies"
-msgstr "Menus"
-
-#: ../../src/gui/preferences.vala:173
-msgid "You can right-click in the list for adding or removing entries."
-msgstr "Você pode clicar com o botão direito sobre a lista para adicioná-las ou removê-las."
-
-#: ../../src/gui/preferences.vala:174
-msgid "You can reset Gnome-Pie to its default options with the terminal command \"gnome-pie --reset\"."
-msgstr "Você pode voltar o Gnome-Pie para suas configurações padrão usando o comando de terminal \"gnome-pie --reset\"."
-
-#: ../../src/gui/preferences.vala:175
-msgid "The radiobutton at the beginning of each slice-line indicates the QuickAction of the pie."
-msgstr "O botão de seleção no início de cada Opção indica a Ação Rápida vinculada ao Menu."
-
-#: ../../src/gui/preferences.vala:176
-msgid "Pies can be opened with the terminal command \"gnome-pie --open=ID\"."
-msgstr "Menus podem ser abertos através do terminal com o comando \"gnome-pie --open=ID\"."
-
-#: ../../src/gui/preferences.vala:177
-msgid "Feel free to visit Gnome-Pie's homepage at %s!"
-msgstr "Sinta-se a vontade para visitar o site do Gnome-Pie em %s"
-
-#: ../../src/gui/preferences.vala:178
-msgid "You can drag'n'drop applications from your main menu to the list above."
-msgstr "Você pode arrastar aplicações do seu menu principal para a lista acima."
-
-#: ../../src/gui/preferences.vala:179
-msgid "If you want to give some feedback, please write an e-mail to %s!"
-msgstr "Se você quiser enviar algum feedback, por favor escreva um e-mail para %s!"
-
-#: ../../src/gui/preferences.vala:180
-msgid "You may drag'n'drop URLs and bookmarks from your internet browser to the list above."
-msgstr "Você pode arrastar URLs e Favoritos do seu navegador predileto para a lista acima."
-
-#: ../../src/gui/preferences.vala:181
-msgid "Bugs can be reported at %s!"
-msgstr "Defeitos podem ser informados em %s!"
-
-#: ../../src/gui/preferences.vala:182
-msgid "It's possible to drag'n'drop files and folders from your file browser to the list above."
-msgstr "É possível arrastar arquivos e pastas do seu navegador para dentro da lista acima."
-
-#: ../../src/gui/preferences.vala:183
-msgid "It's recommended to keep your Pies small (at most 6-8 Slices). Else they will become hard to navigate."
-msgstr "É recomendado que você mantenha seus Menus pequenos (no máximo 6-8 Opções). Ou ele se tornará difícil de navegar."
-
-#: ../../src/gui/preferences.vala:184
-msgid "In order to create a launcher for a Pie, drag the Pie from the list to your desktop!"
-msgstr "Se deseja criar o lançador de um Menu, arraste o Menu da lista para o seu desktop!"
-
-#: ../../src/gui/preferences.vala:193
-msgid "Moves the selected Slice down"
-msgstr "Move a Opção selecionada para baixo"
-
-#: ../../src/gui/preferences.vala:205
-msgid "Moves the selected Slice up"
-msgstr "Move a Opção selecionada para cima"
-
-#: ../../src/gui/pieList.vala:88
-#: ../../src/gui/pieList.vala:851
-msgid "Slice group"
-msgstr "Grupo de Opções"
-
-#: ../../src/gui/pieList.vala:135
-msgid "Icon"
-msgstr "Ícone"
-
-#: ../../src/gui/pieList.vala:200
-msgid "Command"
-msgstr "Comando"
-
-#: ../../src/gui/pieList.vala:301
-#: ../../src/gui/pieList.vala:707
-#: ../../src/gui/pieList.vala:867
-#: ../../src/utilities/trigger.vala:197
-#: ../../src/utilities/trigger.vala:198
-#: ../../src/utilities/bindingManager.vala:156
-msgid "Not bound"
-msgstr "Sem vinculações"
+#: ../../src/gui/preferencesWindow.vala:190
+msgid ""
+"Do you really want to delete the selected Pie with all contained Slices?"
+msgstr ""
+"Você realmente deseja excluir o Menu selecionado e todas as suas Opções?"
-#: ../../src/gui/pieList.vala:366
-msgid "Pie-ID / Action type"
-msgstr "ID-Opção / Tipo de Ação"
+#: ../../src/gui/newSliceWindow.vala:229
+msgid "Rename me!"
+msgstr ""
-#: ../../src/gui/pieList.vala:427
-msgid "Name"
-msgstr "Nome"
+#: ../../src/gui/piePreviewRenderer.vala:292
+msgid "Click to edit"
+msgstr ""
-#: ../../src/gui/pieList.vala:470
-msgid "Add new Pie"
-msgstr "Adicionar novo Menu"
+#: ../../src/gui/piePreviewRenderer.vala:292
+#: ../../src/gui/piePreviewRenderer.vala:307
+msgid "Drag to move"
+msgstr ""
-#: ../../src/gui/pieList.vala:475
-msgid "Add new Slice"
+#: ../../src/gui/piePreviewRenderer.vala:295
+#, fuzzy
+msgid "Click to add a new Slice"
msgstr "Adicionar nova Opção"
-#: ../../src/gui/pieList.vala:483
-msgid "Delete"
-msgstr "Deletar"
+#: ../../src/gui/piePreviewRenderer.vala:299
+#, fuzzy
+msgid "Drop to add as new Slice"
+msgstr "Adicionar nova Opção"
-#: ../../src/gui/pieList.vala:619
-msgid "New Pie"
-msgstr "Novo Menu"
+#: ../../src/gui/piePreviewRenderer.vala:302
+msgid "Drop to move Slice"
+msgstr ""
-#: ../../src/gui/pieList.vala:666
-msgid "New Action"
-msgstr "Nova Ação"
+#: ../../src/gui/piePreviewRenderer.vala:307
+msgid "Click to delete"
+msgstr ""
-#: ../../src/gui/pieList.vala:680
-msgid "You have to select a Pie to add a Slice to!"
-msgstr "Você tem que selecionar um Menu para poder adicionar uma Opção"
+#: ../../src/gui/triggerSelectButton.vala:59
+#, fuzzy
+msgid "Press a hotkey ..."
+msgstr "Pressione a tecla de atalho"
-#: ../../src/gui/pieList.vala:730
-msgid "You have to select a Pie or a Slice to delete!"
-msgstr "Para remover você precisa selecionar um Menu ou uma Opção"
+#: ../../src/gui/piePreview.vala:120
+#, fuzzy
+msgid "Do you really want to delete this Slice?"
+msgstr "Você realmente deseja excluir a Opção selecionada?"
-#: ../../src/gui/pieList.vala:741
-msgid "Do you really want to delete the selected Pie with all contained Slices?"
-msgstr "Você realmente deseja excluir o Menu selecionado e todas as suas Opções?"
+#: ../../src/gui/themeList.vala:48
+msgid "Themes"
+msgstr "Temas"
-#: ../../src/gui/pieList.vala:775
-msgid "Do you really want to delete the selected Slice?"
-msgstr "Você realmente deseja excluir a Opção selecionada?"
+#: ../../src/gui/themeList.vala:80
+msgid "By"
+msgstr ""
-#: ../../src/gui/iconSelectWindow.vala:160
-msgid "Choose an Icon"
-msgstr "Escolha um Ícone"
+#: ../../src/gui/sliceTypeList.vala:56
+#, fuzzy
+msgid "Slice types"
+msgstr "Tipos de arquivos"
-#: ../../src/gui/iconSelectWindow.vala:196
+#: ../../src/gui/iconSelectWindow.vala:178
msgid "All icons"
msgstr "Todos os ícones"
-#: ../../src/gui/iconSelectWindow.vala:197
+#: ../../src/gui/iconSelectWindow.vala:179
#: ../../src/pies/defaultConfig.vala:36
msgid "Applications"
msgstr "Aplicações"
-#: ../../src/gui/iconSelectWindow.vala:198
+#: ../../src/gui/iconSelectWindow.vala:180
msgid "Actions"
msgstr "Ações"
-#: ../../src/gui/iconSelectWindow.vala:199
+#: ../../src/gui/iconSelectWindow.vala:181
msgid "Places"
msgstr "Lugares"
-#: ../../src/gui/iconSelectWindow.vala:200
+#: ../../src/gui/iconSelectWindow.vala:182
msgid "File types"
msgstr "Tipos de arquivos"
-#: ../../src/gui/iconSelectWindow.vala:201
+#: ../../src/gui/iconSelectWindow.vala:183
msgid "Emotes"
msgstr "Emotes"
-#: ../../src/gui/iconSelectWindow.vala:202
+#: ../../src/gui/iconSelectWindow.vala:184
msgid "Miscellaneous"
msgstr "Diversos"
-#: ../../src/gui/iconSelectWindow.vala:279
-msgid "Icon Theme"
-msgstr "Tema de Ícones"
-
-#: ../../src/gui/iconSelectWindow.vala:289
+#: ../../src/gui/iconSelectWindow.vala:257
msgid "All supported image formats"
msgstr "Todos os tipos de imagem suportados"
-#: ../../src/gui/iconSelectWindow.vala:311
-msgid "Custom Icon"
-msgstr "Outros Ícones"
-
-#: ../../src/utilities/trigger.vala:152
-msgid "Button %i"
-msgstr "Botão %i"
-
-#: ../../src/utilities/trigger.vala:155
-msgid "LeftButton"
-msgstr "Botão Esquerdo"
-
-#: ../../src/utilities/trigger.vala:157
-msgid "RightButton"
-msgstr "Botão Direito"
-
-#: ../../src/utilities/trigger.vala:159
-msgid "MiddleButton"
-msgstr "Botão do Meio"
-
-#: ../../src/utilities/trigger.vala:181
-#: ../../src/utilities/trigger.vala:183
-msgid "Turbo"
-msgstr "Turbo"
-
-#: ../../src/utilities/trigger.vala:181
-#: ../../src/utilities/trigger.vala:185
-msgid "Delayed"
-msgstr "Atrasado"
+#: ../../src/actionGroups/windowListGroup.vala:34
+#, fuzzy
+msgid "Group: Window List"
+msgstr "Lista de Janelas"
-#: ../../src/actionGroups/clipboardGroup.vala:63
-msgid "Clipboard"
-msgstr "Clipboard"
+#: ../../src/actionGroups/windowListGroup.vala:36
+msgid "Shows a Slice for each of your opened Windows. Almost like Alt-Tab."
+msgstr ""
-#: ../../src/actionGroups/menuGroup.vala:34
-msgid "Main menu"
+#: ../../src/actionGroups/menuGroup.vala:35
+#, fuzzy
+msgid "Group: Main menu"
msgstr "Menu Principal"
-#: ../../src/actionGroups/windowListGroup.vala:33
-msgid "Window List"
-msgstr "Lista de Janelas"
+#: ../../src/actionGroups/menuGroup.vala:37
+msgid "Displays your main menu structure."
+msgstr ""
-#: ../../src/actionGroups/devicesGroup.vala:34
-msgid "Devices"
-msgstr "Dispositivos"
+#: ../../src/actionGroups/clipboardGroup.vala:64
+#, fuzzy
+msgid "Group: Clipboard"
+msgstr "Clipboard"
-#: ../../src/actionGroups/devicesGroup.vala:82
-msgid "Root"
-msgstr "Raiz"
+#: ../../src/actionGroups/clipboardGroup.vala:66
+msgid "Manages your Clipboard."
+msgstr ""
-#: ../../src/actionGroups/sessionGroup.vala:34
-msgid "Session Control"
+#: ../../src/actionGroups/sessionGroup.vala:35
+#, fuzzy
+msgid "Group: Session Control"
msgstr "Controle de Sessão"
-#: ../../src/actionGroups/sessionGroup.vala:52
+#: ../../src/actionGroups/sessionGroup.vala:37
+msgid "Shows a Slice for Shutdown, Reboot, and Hibernate."
+msgstr ""
+
+#: ../../src/actionGroups/sessionGroup.vala:60
msgid "Shutdown"
msgstr "Desligar"
-#: ../../src/actionGroups/sessionGroup.vala:55
+#: ../../src/actionGroups/sessionGroup.vala:63
msgid "Logout"
msgstr "Logout"
-#: ../../src/actionGroups/sessionGroup.vala:58
+#: ../../src/actionGroups/sessionGroup.vala:66
msgid "Reboot"
msgstr "Reboot"
-#: ../../src/actionGroups/bookmarkGroup.vala:35
-#: ../../src/pies/defaultConfig.vala:45
-msgid "Bookmarks"
+#: ../../src/actionGroups/bookmarkGroup.vala:36
+#, fuzzy
+msgid "Group: Bookmarks"
msgstr "Favoritos"
-#: ../../src/actions/pieAction.vala:33
-msgid "Open Pie"
-msgstr "Abrir menu"
+#: ../../src/actionGroups/bookmarkGroup.vala:38
+msgid "Shows a Slice for each of your directory Bookmarks."
+msgstr ""
-#: ../../src/actions/keyAction.vala:33
-msgid "Press hotkey"
-msgstr "Pressione a tecla de atalho"
+#: ../../src/actionGroups/devicesGroup.vala:35
+#, fuzzy
+msgid "Group: Devices"
+msgstr "Dispositivos"
-#: ../../src/actions/uriAction.vala:33
-msgid "Open URI"
-msgstr "Abrir URL"
+#: ../../src/actionGroups/devicesGroup.vala:37
+msgid "Shows a Slice for each plugged in devices, like USB-Sticks."
+msgstr ""
-#: ../../src/actions/actionRegistry.vala:107
-msgid "Trash"
-msgstr "Remover"
+#: ../../src/actionGroups/devicesGroup.vala:85
+msgid "Root"
+msgstr "Raiz"
-#: ../../src/actions/appAction.vala:33
-msgid "Launch application"
-msgstr "Lançar aplicação"
+#: ../../src/utilities/bindingManager.vala:155 ../../src/utilities/key.vala:65
+#: ../../src/utilities/trigger.vala:216 ../../src/utilities/trigger.vala:217
+msgid "Not bound"
+msgstr "Sem vinculações"
+
+#: ../../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:192 ../../src/utilities/trigger.vala:194
+#: ../../src/utilities/trigger.vala:196 ../../src/utilities/trigger.vala:200
+msgid "Turbo"
+msgstr "Turbo"
+
+#: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:196
+#: ../../src/utilities/trigger.vala:198 ../../src/utilities/trigger.vala:202
+msgid "Delayed"
+msgstr "Atrasado"
+
+#: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:194
+#: ../../src/utilities/trigger.vala:198 ../../src/utilities/trigger.vala:204
+msgid "Centered"
+msgstr ""
#: ../../src/pies/defaultConfig.vala:29
msgid "Multimedia"
@@ -380,6 +289,10 @@ msgstr "Faixa Anterior"
msgid "Play/Pause"
msgstr "Play/Pausa"
+#: ../../src/pies/defaultConfig.vala:45
+msgid "Bookmarks"
+msgstr "Favoritos"
+
#: ../../src/pies/defaultConfig.vala:50
msgid "Session"
msgstr "Sessão"
@@ -412,6 +325,318 @@ msgstr "Maximizar"
msgid "Restore"
msgstr "Restaurar"
+#: ../ui/icon_select.ui:8
+msgid "Select an icon"
+msgstr ""
+
+#: ../ui/icon_select.ui:84
+msgid "Icon Theme"
+msgstr "Tema de Ícones"
+
+#: ../ui/icon_select.ui:105
+msgid "Custom Icon"
+msgstr "Outros Ícones"
+
+#: ../ui/trigger_select.ui:8
+msgid "Activation Settings"
+msgstr ""
+
+#: ../ui/trigger_select.ui:44
+msgid "It's possible to bind mouse buttons as well!"
+msgstr ""
+
+#: ../ui/trigger_select.ui:76
+msgid "Turbo mode"
+msgstr "Modo Turbo"
+
+#: ../ui/trigger_select.ui:80
+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:93
+msgid "Long press for activation"
+msgstr "Clique longo para ativação"
+
+#: ../ui/trigger_select.ui:97
+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:110
+msgid "Open Pie centered on the screen"
+msgstr ""
+
+#: ../ui/trigger_select.ui:114
+#, fuzzy
+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 somente se você pressionar este atalho por "
+"mais um tempo."
+
+#: ../ui/trigger_select.ui:133
+msgid "<b>Activation options</b>"
+msgstr ""
+
+#: ../ui/settings.ui:8 ../ui/preferences.ui:27
+#, fuzzy
+msgid "General Settings"
+msgstr "Gnome-Pie - Configurações"
+
+#: ../ui/settings.ui:47
+#, fuzzy
+msgid "Start Gnome-Pie on login"
+msgstr "Iniciar durante o Login"
+
+#: ../ui/settings.ui:52 ../ui/settings.ui:53
+#, fuzzy
+msgid "If checked, Gnome-Pie will start silently everytime you log in."
+msgstr "Se marcado, o Gnome-Pie irá iniciar durante o login."
+
+#: ../ui/settings.ui:66
+msgid "Display panel icon "
+msgstr ""
+
+#: ../ui/settings.ui:71 ../ui/settings.ui:72
+msgid ""
+"If not checked, you can access this menu by launching Gnome-Pie a second "
+"time."
+msgstr ""
+
+#: ../ui/settings.ui:92
+#, fuzzy
+msgid "Global scale"
+msgstr "Escalonamento Global"
+
+#: ../ui/settings.ui:130
+msgid "<b>Appearance and behavior</b>"
+msgstr ""
+
+#: ../ui/slice_select.ui:8
+#, fuzzy
+msgid "Slice Options"
+msgstr "Aplicações"
+
+#: ../ui/slice_select.ui:95
+msgid "There are no options for this Slice type."
+msgstr ""
+
+#: ../ui/slice_select.ui:121
+msgid "Name of the Slice "
+msgstr ""
+
+#: ../ui/slice_select.ui:159
+msgid "URI to open"
+msgstr ""
+
+#: ../ui/slice_select.ui:197
+msgid "Command to execute"
+msgstr ""
+
+#: ../ui/slice_select.ui:235
+msgid "Hotkey to press"
+msgstr ""
+
+#: ../ui/slice_select.ui:264
+msgid "Pie to open"
+msgstr ""
+
+#: ../ui/slice_select.ui:293
+msgid "Is Quick Action"
+msgstr ""
+
+#: ../ui/slice_select.ui:306
+msgid "This Slice will be executed when you click in the middle of the Pie."
+msgstr ""
+
+#: ../ui/slice_select.ui:339
+msgid "<b>Slice options</b>"
+msgstr ""
+
+#: ../ui/preferences.ui:8
+#, fuzzy
+msgid "Gnome-Pie Settings"
+msgstr "Gnome-Pie - Configurações"
+
+#: ../ui/preferences.ui:261
+msgid ""
+"<b><big>This Pie is empty!</big>\n"
+"\n"
+"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... \n"
+"\n"
+"For manual and advanced configuration click on the plus sign."
+msgstr ""
+
+#: ../ui/preferences.ui:282
+msgid ""
+"<b><big>You have no Pies!</big>\n"
+"\n"
+"Start by creating one! </b> This can be done by clicking on the tiny little "
+"plus sign in the lower left corner."
+msgstr ""
+
+#: ../ui/rename_pie.ui:6
+#, fuzzy
+msgid "Rename a Pie"
+msgstr "Abrir menu"
+
+#~ 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 "Behavior"
+#~ msgstr "Comportamento"
+
+#~ 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 "
@@ -420,4 +645,3 @@ msgstr "Restaurar"
#~ "Se marcado, o menu se fechará quando a combinação de teclas for liberada. "
#~ "A opção que estiver sobre o cursor será executada. Essa opção possibilita "
#~ "uma uma seleção rápida mas desativa a navegação pelo teclado."
-
diff --git a/resources/locale/ru/LC_MESSAGES/gnomepie.mo b/resources/locale/ru/LC_MESSAGES/gnomepie.mo
new file mode 100644
index 0000000..9a51f6c
--- /dev/null
+++ b/resources/locale/ru/LC_MESSAGES/gnomepie.mo
Binary files differ
diff --git a/resources/locale/ru/LC_MESSAGES/ru.po b/resources/locale/ru/LC_MESSAGES/ru.po
new file mode 100644
index 0000000..3020341
--- /dev/null
+++ b/resources/locale/ru/LC_MESSAGES/ru.po
@@ -0,0 +1,656 @@
+# Russian translations for gnomepie package
+# Русские переводы для пакета gnomepie.
+# Copyright (C) 2012 Simon Schneegans <code@simonschneegans.de>
+# This file is distributed under the same license as the gnomepie package.
+# Roskin <pams@imail.ru>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnomepie 0.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-01-19 20:25+0100\n"
+"PO-Revision-Date: 2012-01-14 17:15+0400\n"
+"Last-Translator: Eugene Roskin <pams@imail.ru>\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:111
+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:144
+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:145
+msgid "No Pie selected."
+msgstr "Пай не выбран"
+
+#: ../../src/gui/preferencesWindow.vala:181
+msgid "New Pie"
+msgstr "Новый пай"
+
+#: ../../src/gui/preferencesWindow.vala:190
+msgid ""
+"Do you really want to delete the selected Pie with all contained Slices?"
+msgstr ""
+"Вы действительно хотите удалить выделенный пай, со всеми содержащимися в нём "
+"порциями?"
+
+#: ../../src/gui/newSliceWindow.vala:229
+msgid "Rename me!"
+msgstr "Переименуйте меня!"
+
+#: ../../src/gui/piePreviewRenderer.vala:292
+msgid "Click to edit"
+msgstr "Щёлкните для выполнения изменений"
+
+#: ../../src/gui/piePreviewRenderer.vala:292
+#: ../../src/gui/piePreviewRenderer.vala:307
+msgid "Drag to move"
+msgstr "Перетаскивайте для выполнения перемещения"
+
+#: ../../src/gui/piePreviewRenderer.vala:295
+#, fuzzy
+msgid "Click to add a new Slice"
+msgstr "Щёлкните для добавления новой порции"
+
+#: ../../src/gui/piePreviewRenderer.vala:299
+#, fuzzy
+msgid "Drop to add as new Slice"
+msgstr "Перетаскивайте для выполнения добавления в качастве новой порции"
+
+#: ../../src/gui/piePreviewRenderer.vala:302
+msgid "Drop to move Slice"
+msgstr "Перетаскивайте для выполнения перемещения порции"
+
+#: ../../src/gui/piePreviewRenderer.vala:307
+msgid "Click to delete"
+msgstr "Щёлкните для выполнения удаления"
+
+#: ../../src/gui/triggerSelectButton.vala:59
+#, fuzzy
+msgid "Press a hotkey ..."
+msgstr "Нажмите сочетание клавиш быстрого доступа"
+
+#: ../../src/gui/piePreview.vala:120
+#, fuzzy
+msgid "Do you really want to delete this Slice?"
+msgstr "Вы действительно хотите удалить эту порцию?"
+
+#: ../../src/gui/themeList.vala:48
+msgid "Themes"
+msgstr "Темы"
+
+#: ../../src/gui/themeList.vala:80
+msgid "By"
+msgstr "-"
+
+#: ../../src/gui/sliceTypeList.vala:56
+#, fuzzy
+msgid "Slice types"
+msgstr "Типы порций"
+
+#: ../../src/gui/iconSelectWindow.vala:178
+msgid "All icons"
+msgstr "Все значки"
+
+#: ../../src/gui/iconSelectWindow.vala:179
+#: ../../src/pies/defaultConfig.vala:36
+msgid "Applications"
+msgstr "Приложения"
+
+#: ../../src/gui/iconSelectWindow.vala:180
+msgid "Actions"
+msgstr "Действия"
+
+#: ../../src/gui/iconSelectWindow.vala:181
+msgid "Places"
+msgstr "Переходы"
+
+#: ../../src/gui/iconSelectWindow.vala:182
+msgid "File types"
+msgstr "Типы файлов"
+
+#: ../../src/gui/iconSelectWindow.vala:183
+msgid "Emotes"
+msgstr "Эмоции"
+
+#: ../../src/gui/iconSelectWindow.vala:184
+msgid "Miscellaneous"
+msgstr "Дополнительно"
+
+#: ../../src/gui/iconSelectWindow.vala:257
+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:155 ../../src/utilities/key.vala:65
+#: ../../src/utilities/trigger.vala:216 ../../src/utilities/trigger.vala:217
+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:192 ../../src/utilities/trigger.vala:194
+#: ../../src/utilities/trigger.vala:196 ../../src/utilities/trigger.vala:200
+msgid "Turbo"
+msgstr "Турбо"
+
+#: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:196
+#: ../../src/utilities/trigger.vala:198 ../../src/utilities/trigger.vala:202
+msgid "Delayed"
+msgstr "Задержка"
+
+#: ../../src/utilities/trigger.vala:192 ../../src/utilities/trigger.vala:194
+#: ../../src/utilities/trigger.vala:198 ../../src/utilities/trigger.vala:204
+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:84
+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:44
+msgid "It's possible to bind mouse buttons as well!"
+msgstr "Также возможно назначать кнопки мыши!"
+
+#: ../ui/trigger_select.ui:76
+msgid "Turbo mode"
+msgstr "Турбо-режим"
+
+#: ../ui/trigger_select.ui:80
+msgid "If checked, the Pie will close when you release the chosen hot key."
+msgstr ""
+"Если выбрана эта возможность, пай закроется после того, как вы отпустите "
+" клавиши быстрого доступа"
+
+#: ../ui/trigger_select.ui:93
+msgid "Long press for activation"
+msgstr "Продолжительное нажатие для активации"
+
+#: ../ui/trigger_select.ui:97
+msgid ""
+"If checked, the Pie will only open if you press this hot key a bit longer."
+msgstr ""
+"Если выбрана эта возможность, пай откроется только, если вы "
+"продолжительно зажмёте эту клавишу быстрого доступа."
+
+#: ../ui/trigger_select.ui:110
+msgid "Open Pie centered on the screen"
+msgstr "Открыть пай по центру экрана"
+
+#: ../ui/trigger_select.ui:114
+#, 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:133
+msgid "<b>Activation options</b>"
+msgstr "<b>Параметры активации</b>"
+
+#: ../ui/settings.ui:8 ../ui/preferences.ui:27
+#, fuzzy
+msgid "General Settings"
+msgstr "Основные настройки"
+
+#: ../ui/settings.ui:47
+#, fuzzy
+msgid "Start Gnome-Pie on login"
+msgstr "Запускать Gnome-Pie при загрузке системы"
+
+#: ../ui/settings.ui:52 ../ui/settings.ui:53
+#, fuzzy
+msgid "If checked, Gnome-Pie will start silently everytime you log in."
+msgstr ""
+"Если выбрана эта возможность, Gnome-Pie будет фоново запускаться после входа в систему."
+
+#: ../ui/settings.ui:66
+msgid "Display panel icon "
+msgstr "Показывать значок на панели "
+
+#: ../ui/settings.ui:71 ../ui/settings.ui:72
+msgid ""
+"If not checked, you can access this menu by launching Gnome-Pie a second "
+"time."
+msgstr ""
+"Если эта возможность не выбрана, вы можете получить доступ к этому меню запустив "
+"Gnome-Pie второй раз."
+
+#: ../ui/settings.ui:92
+#, fuzzy
+msgid "Global scale"
+msgstr "Общий масштаб"
+
+#: ../ui/settings.ui:130
+msgid "<b>Appearance and behavior</b>"
+msgstr "<b>Оформление и поведение</b>"
+
+#: ../ui/slice_select.ui:8
+#, fuzzy
+msgid "Slice Options"
+msgstr "Параметры порции"
+
+#: ../ui/slice_select.ui:95
+msgid "There are no options for this Slice type."
+msgstr "Отсутствуют параметры для этого типа порции"
+
+#: ../ui/slice_select.ui:121
+msgid "Name of the Slice "
+msgstr "Название порции"
+
+#: ../ui/slice_select.ui:159
+msgid "URI to open"
+msgstr "URI для открытия"
+
+#: ../ui/slice_select.ui:197
+msgid "Command to execute"
+msgstr "Командая для выполнения"
+
+#: ../ui/slice_select.ui:235
+msgid "Hotkey to press"
+msgstr "Клавиша быстрого доступа для нажатия"
+
+#: ../ui/slice_select.ui:264
+msgid "Pie to open"
+msgstr "Пай для открытия"
+
+#: ../ui/slice_select.ui:293
+msgid "Is Quick Action"
+msgstr "Это быстрое действие"
+
+#: ../ui/slice_select.ui:306
+msgid "This Slice will be executed when you click in the middle of the Pie."
+msgstr "Эта порция будет выполнена, после нажатия в центре пая"
+
+#: ../ui/slice_select.ui:339
+msgid "<b>Slice options</b>"
+msgstr "<b>Параметры порции</b>"
+
+#: ../ui/preferences.ui:8
+#, fuzzy
+msgid "Gnome-Pie Settings"
+msgstr "Настройки Gnome-Pie"
+
+#: ../ui/preferences.ui:261
+msgid ""
+"<b><big>This Pie is empty!</big>\n"
+"\n"
+"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... \n"
+"\n"
+"For manual and advanced configuration click on the plus sign."
+msgstr ""
+"<b><big>Этот пай пуст!</big>\n"
+"\n"
+"Начните добавлять в него порции!</b> Выполните это перетаскивая элементы в значок "
+"плюса ниже. Делайте многое! Например ярлыки запуска программ или папки."
+"А также адресные ссылки из вашего обозревателя... \n"
+"\n"
+"Для выполнения самостоятельной и подробной настройки, щёлкните на знаке плюса."
+
+#: ../ui/preferences.ui:282
+msgid ""
+"<b><big>You have no Pies!</big>\n"
+"\n"
+"Start by creating one! </b> This can be done by clicking on the tiny little "
+"plus sign in the lower left corner."
+msgstr ""
+"<b><big>Отсутствуют паи!</big>\n"
+"\n"
+"Начните с создания пая! </b> Выполните это щёлкнув на небольшом значке плюса"
+"в нижнем левом углу."
+
+#: ../ui/rename_pie.ui:6
+#, fuzzy
+msgid "Rename a Pie"
+msgstr "Переименовать пай"
+
+#~ msgid "Behavior"
+#~ 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 "-"
diff --git a/resources/themes/adwaita/preview.png b/resources/themes/adwaita/preview.png
new file mode 100644
index 0000000..d8dd27a
--- /dev/null
+++ b/resources/themes/adwaita/preview.png
Binary files differ
diff --git a/resources/themes/bright/preview.png b/resources/themes/bright/preview.png
new file mode 100644
index 0000000..babbafa
--- /dev/null
+++ b/resources/themes/bright/preview.png
Binary files differ
diff --git a/resources/themes/elementary/preview.png b/resources/themes/elementary/preview.png
new file mode 100644
index 0000000..4825ba1
--- /dev/null
+++ b/resources/themes/elementary/preview.png
Binary files differ
diff --git a/resources/themes/funky/preview.png b/resources/themes/funky/preview.png
new file mode 100644
index 0000000..f8b11a8
--- /dev/null
+++ b/resources/themes/funky/preview.png
Binary files differ
diff --git a/resources/themes/gloss/preview.png b/resources/themes/gloss/preview.png
new file mode 100644
index 0000000..945fe2a
--- /dev/null
+++ b/resources/themes/gloss/preview.png
Binary files differ
diff --git a/resources/themes/o-pie/preview.png b/resources/themes/o-pie/preview.png
new file mode 100644
index 0000000..24476cd
--- /dev/null
+++ b/resources/themes/o-pie/preview.png
Binary files differ
diff --git a/resources/themes/slim/preview.png b/resources/themes/slim/preview.png
new file mode 100644
index 0000000..c26a04a
--- /dev/null
+++ b/resources/themes/slim/preview.png
Binary files differ
diff --git a/resources/themes/unity/preview.png b/resources/themes/unity/preview.png
new file mode 100644
index 0000000..058f558
--- /dev/null
+++ b/resources/themes/unity/preview.png
Binary files differ
diff --git a/resources/ui/icon_select.ui b/resources/ui/icon_select.ui
new file mode 100644
index 0000000..d740091
--- /dev/null
+++ b/resources/ui/icon_select.ui
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <object class="GtkWindow" id="window">
+ <property name="width_request">525</property>
+ <property name="height_request">425</property>
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">Select an icon</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="destroy_with_parent">True</property>
+ <property name="type_hint">dialog</property>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="width_request">300</property>
+ <property name="height_request">200</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkNotebook" id="tabs">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <object class="GtkVBox" id="theme-box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkVBox" id="combo-box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="filter-entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="primary_icon_stock">gtk-find</property>
+ <property name="secondary_icon_stock">gtk-clear</property>
+ <property name="primary_icon_activatable">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="icon-scrolledwindow">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Icon Theme</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFileChooserWidget" id="filechooser">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Custom Icon</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHButtonBox" id="hbuttonbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkSpinner" id="spinner">
+ <property name="width_request">16</property>
+ <property name="height_request">16</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel-button">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="ok-button">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/resources/ui/preferences.ui b/resources/ui/preferences.ui
new file mode 100644
index 0000000..e814acf
--- /dev/null
+++ b/resources/ui/preferences.ui
@@ -0,0 +1,348 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.16"/>
+ <object class="GtkWindow" id="window">
+ <property name="width_request">600</property>
+ <property name="height_request">475</property>
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">Gnome-Pie Settings</property>
+ <property name="resizable">False</property>
+ <property name="window_position">center</property>
+ <property name="has_resize_grip">False</property>
+ <child>
+ <object class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkToolbar" id="toolbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="toolbar_style">both-horiz</property>
+ <child>
+ <object class="GtkToolButton" id="settings-button">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="is_important">True</property>
+ <property name="label" translatable="yes">General Settings</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-preferences</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="main-vbox1">
+ <property name="can_focus">False</property>
+ <property name="border_width">10</property>
+ <property name="spacing">10</property>
+ <child>
+ <object class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkVBox" id="pie-list-box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkScrolledWindow" id="pies-scrolledwindow">
+ <property name="width_request">170</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolbar" id="pies-toolbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="toolbar_style">icons</property>
+ <property name="icon_size">1</property>
+ <child>
+ <object class="GtkToolButton" id="add-pie-button">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">list-add-symbolic</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="remove-pie-button">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">list-remove-symbolic</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="pie-box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkButton" id="icon-button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="relief">none</property>
+ <property name="focus_on_click">False</property>
+ <child>
+ <object class="GtkImage" id="icon">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">48</property>
+ <property name="icon_name">preferences-desktop-wallpaper</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="pie-box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkButton" id="rename-button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="relief">none</property>
+ <property name="use_underline">True</property>
+ <property name="focus_on_click">False</property>
+ <child>
+ <object class="GtkLabel" id="pie-name-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="xpad">2</property>
+ <property name="ellipsize">end</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ <attribute name="scale" value="1.2"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="key-button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="relief">none</property>
+ <property name="use_underline">True</property>
+ <property name="focus_on_click">False</property>
+ <child>
+ <object class="GtkLabel" id="hotkey-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="xpad">2</property>
+ <property name="ellipsize">end</property>
+ <attributes>
+ <attribute name="weight" value="light"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="id-label">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.11999999731779099</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="preview-frame">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <child>
+ <object class="GtkEventBox" id="preview-background">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkVBox" id="pie-edit-box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">2</property>
+ <child>
+ <object class="GtkLabel" id="no-slice-label">
+ <property name="can_focus">False</property>
+ <property name="xpad">6</property>
+ <property name="ypad">6</property>
+ <property name="label" translatable="yes">&lt;b&gt;&lt;big&gt;This Pie is empty!&lt;/big&gt;
+
+Start adding Slices to it!&lt;/b&gt; 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.</property>
+ <property name="use_markup">True</property>
+ <property name="justify">fill</property>
+ <property name="wrap">True</property>
+ <property name="max_width_chars">0</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="no-pie-label">
+ <property name="can_focus">False</property>
+ <property name="xpad">6</property>
+ <property name="ypad">6</property>
+ <property name="label" translatable="yes">&lt;b&gt;&lt;big&gt;You have no Pies!&lt;/big&gt;
+
+Start by creating one! &lt;/b&gt; This can be done by clicking on the tiny little plus sign in the lower left corner.</property>
+ <property name="use_markup">True</property>
+ <property name="justify">fill</property>
+ <property name="wrap">True</property>
+ <property name="max_width_chars">0</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="preview-box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label_item">
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/resources/ui/rename_pie.ui b/resources/ui/rename_pie.ui
new file mode 100644
index 0000000..b8bcc9e
--- /dev/null
+++ b/resources/ui/rename_pie.ui
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <object class="GtkDialog" id="window">
+ <property name="width_request">350</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Rename a Pie</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
+ <property name="destroy_with_parent">True</property>
+ <property name="type_hint">dialog</property>
+ <property name="has_resize_grip">False</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="cancel-button">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="ok-button">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkEntry" id="name-entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">•</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">cancel-button</action-widget>
+ <action-widget response="0">ok-button</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/resources/ui/settings.ui b/resources/ui/settings.ui
new file mode 100644
index 0000000..8c3f13a
--- /dev/null
+++ b/resources/ui/settings.ui
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <object class="GtkDialog" id="window">
+ <property name="width_request">550</property>
+ <property name="height_request">450</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">General Settings</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
+ <property name="destroy_with_parent">True</property>
+ <property name="type_hint">dialog</property>
+ <property name="has_resize_grip">False</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="close-button">
+ <property name="label">gtk-close</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">6</property>
+ <property name="left_padding">6</property>
+ <property name="right_padding">6</property>
+ <child>
+ <object class="GtkVBox" id="vbox5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="autostart-checkbox">
+ <property name="label" translatable="yes">Start Gnome-Pie on login</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">If checked, Gnome-Pie will start silently everytime you log in.</property>
+ <property name="tooltip_text" translatable="yes">If checked, Gnome-Pie will start silently everytime you log in.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="indicator-checkbox">
+ <property name="label" translatable="yes">Display panel icon </property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">If not checked, you can access this menu by launching Gnome-Pie a second time.</property>
+ <property name="tooltip_text" translatable="yes">If not checked, you can access this menu by launching Gnome-Pie a second time.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Global scale</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHScale" id="scale-hscale">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="fill_level">2</property>
+ <property name="round_digits">2</property>
+ <property name="digits">2</property>
+ <property name="value_pos">right</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Appearance and behavior</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="theme-scrolledwindow">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">close-button</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/resources/ui/slice_select.ui b/resources/ui/slice_select.ui
new file mode 100644
index 0000000..639447c
--- /dev/null
+++ b/resources/ui/slice_select.ui
@@ -0,0 +1,415 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <object class="GtkDialog" id="window">
+ <property name="width_request">550</property>
+ <property name="height_request">450</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Slice Options</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
+ <property name="destroy_with_parent">True</property>
+ <property name="type_hint">dialog</property>
+ <property name="has_resize_grip">False</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="cancel-button">
+ <property name="label">gtk-close</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="ok-button">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkScrolledWindow" id="slice-scrolledwindow">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">6</property>
+ <property name="left_padding">6</property>
+ <property name="right_padding">6</property>
+ <child>
+ <object class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkButton" id="icon-button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="relief">none</property>
+ <child>
+ <object class="GtkImage" id="icon">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">72</property>
+ <property name="icon_name">application-default-icon</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="options-box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <object class="GtkVBox" id="no-options-box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">There are no options for this Slice type.</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="name-box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <object class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Name of the Slice </property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="name-entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">•</property>
+ <property name="invisible_char_set">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="uri-box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <object class="GtkLabel" id="label11">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">URI to open</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="uri-entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">•</property>
+ <property name="invisible_char_set">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="command-box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <object class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Command to execute</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="command-entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">•</property>
+ <property name="invisible_char_set">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hotkey-box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <object class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Hotkey to press</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="pie-box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <object class="GtkLabel" id="label14">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Pie to open</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="quickaction-box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <object class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Is Quick Action</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="quick-action-checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">This Slice will be executed when you click in the middle of the Pie.</property>
+ <property name="tooltip_text" translatable="yes">This Slice will be executed when you click in the middle of the Pie.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">6</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Slice options</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">cancel-button</action-widget>
+ <action-widget response="0">ok-button</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/resources/ui/trigger_select.ui b/resources/ui/trigger_select.ui
new file mode 100644
index 0000000..5a0deec
--- /dev/null
+++ b/resources/ui/trigger_select.ui
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <object class="GtkDialog" id="window">
+ <property name="width_request">350</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Activation Settings</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
+ <property name="destroy_with_parent">True</property>
+ <property name="type_hint">dialog</property>
+ <property name="has_resize_grip">False</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="cancel-button">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="ok-button">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkVBox" id="trigger-box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">It's possible to bind mouse buttons as well!</property>
+ <attributes>
+ <attribute name="weight" value="light"/>
+ <attribute name="scale" value="0.80000000000000004"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">6</property>
+ <property name="left_padding">6</property>
+ <property name="right_padding">6</property>
+ <child>
+ <object class="GtkVBox" id="vbox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkCheckButton" id="turbo-check">
+ <property name="label" translatable="yes">Turbo mode</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">If checked, the Pie will close when you release the chosen hot key.</property>
+ <property name="tooltip_text" translatable="yes">If checked, the Pie will close when you release the chosen hot key.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="delay-check">
+ <property name="label" translatable="yes">Long press for activation</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">If checked, the Pie will only open if you press this hot key a bit longer.</property>
+ <property name="tooltip_text" translatable="yes">If checked, the Pie will only open if you press this hot key a bit longer.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="center-check">
+ <property name="label" translatable="yes">Open Pie centered on the screen</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">If checked, the Pie will open in the middle of your screen. Else it will pop up at your pointer.</property>
+ <property name="tooltip_text" translatable="yes">If checked, the Pie will open in the middle of your screen. Else it will pop up at your pointer.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Activation options</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">cancel-button</action-widget>
+ <action-widget response="0">ok-button</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 23b9474..b809c48 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -9,6 +9,10 @@ if (${INDICATOR_FOUND})
SET(DEFINES --define HAVE_APPINDICATOR)
endif(${INDICATOR_FOUND})
+if (${GTK3_FOUND})
+ SET(DEFINES --define HAVE_GTK_3)
+endif(${GTK3_FOUND})
+
if (${GMENU3_FOUND})
LIST(APPEND DEFINES --define HAVE_GMENU_3)
endif (${GMENU3_FOUND})
@@ -39,7 +43,7 @@ install(
# install credits
install(
FILES
- ${CMAKE_SOURCE_DIR}/README
+ ${CMAKE_SOURCE_DIR}/README.md
DESTINATION
${CMAKE_INSTALL_PREFIX}/share/doc/gnome-pie
)
@@ -63,11 +67,18 @@ install(
${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-indicator.svg
DESTINATION
${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps
)
diff --git a/src/actionGroups/actionGroup.vala b/src/actionGroups/actionGroup.vala
index a6b52ff..c54be2f 100644
--- a/src/actionGroups/actionGroup.vala
+++ b/src/actionGroups/actionGroup.vala
@@ -70,6 +70,27 @@ public class ActionGroup : GLib.Object {
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;
+ }
}
}
diff --git a/src/actionGroups/bookmarkGroup.vala b/src/actionGroups/bookmarkGroup.vala
index 389b14a..0a560c5 100644
--- a/src/actionGroups/bookmarkGroup.vala
+++ b/src/actionGroups/bookmarkGroup.vala
@@ -31,10 +31,13 @@ public class BookmarkGroup : ActionGroup {
/// the pies.conf file for this kind of ActionGroups.
/////////////////////////////////////////////////////////////////////
- public static void register(out string name, out string icon, out string settings_name) {
- name = _("Bookmarks");
- icon = "user-bookmarks";
- settings_name = "bookmarks";
+ 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;
}
/////////////////////////////////////////////////////////////////////
diff --git a/src/actionGroups/clipboardGroup.vala b/src/actionGroups/clipboardGroup.vala
index cd1da36..836c927 100644
--- a/src/actionGroups/clipboardGroup.vala
+++ b/src/actionGroups/clipboardGroup.vala
@@ -59,10 +59,13 @@ public class ClipboardGroup : ActionGroup {
/// the pies.conf file for this kind of ActionGroups.
/////////////////////////////////////////////////////////////////////
- public static void register(out string name, out string icon, out string settings_name) {
- name = _("Clipboard");
- icon = "edit-paste";
- settings_name = "clipboard";
+ 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;
}
/////////////////////////////////////////////////////////////////////
diff --git a/src/actionGroups/devicesGroup.vala b/src/actionGroups/devicesGroup.vala
index 3d2ced0..dee6a6e 100644
--- a/src/actionGroups/devicesGroup.vala
+++ b/src/actionGroups/devicesGroup.vala
@@ -30,10 +30,13 @@ public class DevicesGroup : ActionGroup {
/// the pies.conf file for this kind of ActionGroups.
/////////////////////////////////////////////////////////////////////
- public static void register(out string name, out string icon, out string settings_name) {
- name = _("Devices");
- icon = "harddrive";
- settings_name = "devices";
+ 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;
}
/////////////////////////////////////////////////////////////////////
diff --git a/src/actionGroups/groupRegistry.vala b/src/actionGroups/groupRegistry.vala
index a9f8d06..7510a03 100644
--- a/src/actionGroups/groupRegistry.vala
+++ b/src/actionGroups/groupRegistry.vala
@@ -27,67 +27,67 @@ public class GroupRegistry : GLib.Object {
/// A list containing all available ActionGroup types.
/////////////////////////////////////////////////////////////////////
- public static Gee.ArrayList<Type> types { get; private set; }
+ public static Gee.ArrayList<string> types { get; private set; }
/////////////////////////////////////////////////////////////////////
- /// Three maps associating a displayable name for each ActionGroup,
+ /// 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<Type, string> names { get; private set; }
- public static Gee.HashMap<Type, string> icons { get; private set; }
- public static Gee.HashMap<Type, string> settings_names { get; private set; }
+ public static Gee.HashMap<string, TypeDescription?> 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<Type>();
+ types = new Gee.ArrayList<string>();
+ descriptions = new Gee.HashMap<string, TypeDescription?>();
- names = new Gee.HashMap<Type, string>();
- icons = new Gee.HashMap<Type, string>();
- settings_names = new Gee.HashMap<Type, string>();
-
- string name = "";
- string icon = "";
- string settings_name = "";
+ TypeDescription type_description;
- BookmarkGroup.register(out name, out icon, out settings_name);
- types.add(typeof(BookmarkGroup));
- names.set(typeof(BookmarkGroup), name);
- icons.set(typeof(BookmarkGroup), icon);
- settings_names.set(typeof(BookmarkGroup), settings_name);
+ type_description = BookmarkGroup.register();
+ types.add(typeof(BookmarkGroup).name());
+ descriptions.set(typeof(BookmarkGroup).name(), type_description);
- DevicesGroup.register(out name, out icon, out settings_name);
- types.add(typeof(DevicesGroup));
- names.set(typeof(DevicesGroup), name);
- icons.set(typeof(DevicesGroup), icon);
- settings_names.set(typeof(DevicesGroup), settings_name);
+ type_description = DevicesGroup.register();
+ types.add(typeof(DevicesGroup).name());
+ descriptions.set(typeof(DevicesGroup).name(), type_description);
- MenuGroup.register(out name, out icon, out settings_name);
- types.add(typeof(MenuGroup));
- names.set(typeof(MenuGroup), name);
- icons.set(typeof(MenuGroup), icon);
- settings_names.set(typeof(MenuGroup), settings_name);
+ type_description = MenuGroup.register();
+ types.add(typeof(MenuGroup).name());
+ descriptions.set(typeof(MenuGroup).name(), type_description);
- SessionGroup.register(out name, out icon, out settings_name);
- types.add(typeof(SessionGroup));
- names.set(typeof(SessionGroup), name);
- icons.set(typeof(SessionGroup), icon);
- settings_names.set(typeof(SessionGroup), settings_name);
+ type_description = SessionGroup.register();
+ types.add(typeof(SessionGroup).name());
+ descriptions.set(typeof(SessionGroup).name(), type_description);
- WindowListGroup.register(out name, out icon, out settings_name);
- types.add(typeof(WindowListGroup));
- names.set(typeof(WindowListGroup), name);
- icons.set(typeof(WindowListGroup), icon);
- settings_names.set(typeof(WindowListGroup), settings_name);
+ 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);
+ }
-// ClipboardGroup.register(out name, out icon, out settings_name);
-// types.add(typeof(ClipboardGroup));
-// names.set(typeof(ClipboardGroup), name);
-// icons.set(typeof(ClipboardGroup), icon);
-// settings_names.set(typeof(ClipboardGroup), settings_name);
+ return null;
}
}
diff --git a/src/actionGroups/menuGroup.vala b/src/actionGroups/menuGroup.vala
index 07a4bd1..247376d 100644
--- a/src/actionGroups/menuGroup.vala
+++ b/src/actionGroups/menuGroup.vala
@@ -30,10 +30,13 @@ public class MenuGroup : ActionGroup {
/// the pies.conf file for this kind of ActionGroups.
/////////////////////////////////////////////////////////////////////
- public static void register(out string name, out string icon, out string settings_name) {
- name = _("Main menu");
- icon = "gnome-main-menu";
- settings_name = "menu";
+ 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;
}
/////////////////////////////////////////////////////////////////////
diff --git a/src/actionGroups/sessionGroup.vala b/src/actionGroups/sessionGroup.vala
index 0b3f249..26f8ebc 100644
--- a/src/actionGroups/sessionGroup.vala
+++ b/src/actionGroups/sessionGroup.vala
@@ -30,10 +30,13 @@ public class SessionGroup : ActionGroup {
/// the pies.conf file for this kind of ActionGroups.
/////////////////////////////////////////////////////////////////////
- public static void register(out string name, out string icon, out string settings_name) {
- name = _("Session Control");
- icon = "gnome-logout";
- settings_name = "session";
+ 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;
}
/////////////////////////////////////////////////////////////////////
diff --git a/src/actionGroups/windowListGroup.vala b/src/actionGroups/windowListGroup.vala
index b12f188..18bf55b 100644
--- a/src/actionGroups/windowListGroup.vala
+++ b/src/actionGroups/windowListGroup.vala
@@ -29,10 +29,13 @@ public class WindowListGroup : ActionGroup {
/// the pies.conf file for this kind of ActionGroups.
/////////////////////////////////////////////////////////////////////
- public static void register(out string name, out string icon, out string settings_name) {
- name = _("Window List");
- icon = "window-manager";
- settings_name = "window_list";
+ public static GroupRegistry.TypeDescription register() {
+ var description = new GroupRegistry.TypeDescription();
+ description.name = _("Group: Window List");
+ description.icon = "window-manager";
+ description.description = _("Shows a Slice for each of your opened Windows. Almost like Alt-Tab.");
+ description.id = "window_list";
+ return description;
}
/////////////////////////////////////////////////////////////////////
diff --git a/src/actions/action.vala b/src/actions/action.vala
index ceed357..ff0e9cd 100644
--- a/src/actions/action.vala
+++ b/src/actions/action.vala
@@ -42,14 +42,14 @@ public abstract class Action : GLib.Object {
/// The name of the Action.
/////////////////////////////////////////////////////////////////////
- public virtual string name { get; protected set; }
+ 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; protected set; }
+ public virtual string icon { get; set; }
/////////////////////////////////////////////////////////////////////
/// True, if this Action is the quickAction of the associated Pie.
@@ -57,14 +57,14 @@ public abstract class Action : GLib.Object {
/// the center of a Pie.
/////////////////////////////////////////////////////////////////////
- public virtual bool is_quick_action { get; protected set; }
+ public virtual bool is_quickaction { get; set; }
/////////////////////////////////////////////////////////////////////
/// C'tor, initializes all members.
/////////////////////////////////////////////////////////////////////
- public Action(string name, string icon, bool is_quick_action) {
- GLib.Object(name : name, icon : icon, is_quick_action : is_quick_action);
+ public Action(string name, string icon, bool is_quickaction) {
+ GLib.Object(name : name, icon : icon, is_quickaction : is_quickaction);
}
/////////////////////////////////////////////////////////////////////
diff --git a/src/actions/actionRegistry.vala b/src/actions/actionRegistry.vala
index 091865f..135e90c 100644
--- a/src/actions/actionRegistry.vala
+++ b/src/actions/actionRegistry.vala
@@ -27,56 +27,68 @@ public class ActionRegistry : GLib.Object {
/// A list containing all available Action types.
/////////////////////////////////////////////////////////////////////
- public static Gee.ArrayList<Type> types { get; private set; }
+ public static Gee.ArrayList<string> types { get; private set; }
/////////////////////////////////////////////////////////////////////
- /// Three maps associating a displayable name for each Action,
+ /// 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<Type, string> names { get; private set; }
- public static Gee.HashMap<Type, bool> icon_name_editables { get; private set; }
- public static Gee.HashMap<Type, string> settings_names { get; private set; }
+ public static Gee.HashMap<string, TypeDescription?> 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<Type>();
-
- names = new Gee.HashMap<Type, string>();
- icon_name_editables = new Gee.HashMap<Type, bool>();
- settings_names = new Gee.HashMap<Type, string>();
+ types = new Gee.ArrayList<string>();
+ descriptions = new Gee.HashMap<string, TypeDescription?>();
- string name = "";
- bool icon_name_editable = true;
- string settings_name = "";
+ TypeDescription type_description;
- AppAction.register(out name, out icon_name_editable, out settings_name);
- types.add(typeof(AppAction));
- names.set(typeof(AppAction), name);
- icon_name_editables.set(typeof(AppAction), icon_name_editable);
- settings_names.set(typeof(AppAction), settings_name);
+ types.add(typeof(AppAction).name());
+ type_description = AppAction.register();
+ descriptions.set(typeof(AppAction).name(), type_description);
- KeyAction.register(out name, out icon_name_editable, out settings_name);
- types.add(typeof(KeyAction));
- names.set(typeof(KeyAction), name);
- icon_name_editables.set(typeof(KeyAction), icon_name_editable);
- settings_names.set(typeof(KeyAction), settings_name);
+ types.add(typeof(KeyAction).name());
+ type_description = KeyAction.register();
+ descriptions.set(typeof(KeyAction).name(), type_description);
- PieAction.register(out name, out icon_name_editable, out settings_name);
- types.add(typeof(PieAction));
- names.set(typeof(PieAction), name);
- icon_name_editables.set(typeof(PieAction), icon_name_editable);
- settings_names.set(typeof(PieAction), settings_name);
+ 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);
+ }
- UriAction.register(out name, out icon_name_editable, out settings_name);
- types.add(typeof(UriAction));
- names.set(typeof(UriAction), name);
- icon_name_editables.set(typeof(UriAction), icon_name_editable);
- settings_names.set(typeof(UriAction), settings_name);
+ return null;
}
/////////////////////////////////////////////////////////////////////
@@ -109,10 +121,12 @@ public class ActionRegistry : GLib.Object {
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:
@@ -174,6 +188,12 @@ public class ActionRegistry : GLib.Object {
/////////////////////////////////////////////////////////////////////
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);
}
@@ -192,9 +212,23 @@ public class ActionRegistry : GLib.Object {
/////////////////////////////////////////////////////////////////////
public static Action? default_for_uri(string uri) {
- var info = AppInfo. get_default_for_uri_scheme(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;
+ }
}
}
diff --git a/src/actions/appAction.vala b/src/actions/appAction.vala
index d8363e4..2371f7c 100644
--- a/src/actions/appAction.vala
+++ b/src/actions/appAction.vala
@@ -29,10 +29,14 @@ public class AppAction : Action {
/// used in the pies.conf file for this kind of Actions.
/////////////////////////////////////////////////////////////////////
- public static void register(out string name, out bool icon_name_editable, out string settings_name) {
- name = _("Launch application");
- icon_name_editable = true;
- settings_name = "app";
+ 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;
}
/////////////////////////////////////////////////////////////////////
@@ -51,8 +55,8 @@ public class AppAction : Action {
/// C'tor, initializes all members.
/////////////////////////////////////////////////////////////////////
- public AppAction(string name, string icon, string command, bool is_quick_action = false) {
- GLib.Object(name : name, icon : icon, real_command : command, is_quick_action : is_quick_action);
+ 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);
}
/////////////////////////////////////////////////////////////////////
diff --git a/src/actions/keyAction.vala b/src/actions/keyAction.vala
index ddeebb5..3816686 100644
--- a/src/actions/keyAction.vala
+++ b/src/actions/keyAction.vala
@@ -29,10 +29,14 @@ public class KeyAction : Action {
/// used in the pies.conf file for this kind of Actions.
/////////////////////////////////////////////////////////////////////
- public static void register(out string name, out bool icon_name_editable, out string settings_name) {
- name = _("Press hotkey");
- icon_name_editable = true;
- settings_name = "key";
+ 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;
}
/////////////////////////////////////////////////////////////////////
@@ -57,12 +61,12 @@ public class KeyAction : Action {
/// C'tor, initializes all members.
/////////////////////////////////////////////////////////////////////
- public KeyAction(string name, string icon, string command, bool is_quick_action = false) {
- GLib.Object(name : name, icon : icon, real_command : command, is_quick_action : is_quick_action);
+ 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(real_command);
+ this.key = new Key.from_string(real_command);
}
/////////////////////////////////////////////////////////////////////
diff --git a/src/actions/pieAction.vala b/src/actions/pieAction.vala
index 53ea919..5b2c81d 100644
--- a/src/actions/pieAction.vala
+++ b/src/actions/pieAction.vala
@@ -29,10 +29,14 @@ public class PieAction : Action {
/// used in the pies.conf file for this kind of Actions.
/////////////////////////////////////////////////////////////////////
- public static void register(out string name, out bool icon_name_editable, out string settings_name) {
- name = _("Open Pie");
- icon_name_editable = false;
- settings_name = "pie";
+ 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;
}
/////////////////////////////////////////////////////////////////////
@@ -79,8 +83,8 @@ public class PieAction : Action {
/// C'tor, initializes all members.
/////////////////////////////////////////////////////////////////////
- public PieAction(string id, bool is_quick_action = false) {
- GLib.Object(name : "", icon : "", real_command : id, is_quick_action : is_quick_action);
+ public PieAction(string id, bool is_quickaction = false) {
+ GLib.Object(name : "", icon : "", real_command : id, is_quickaction : is_quickaction);
}
/////////////////////////////////////////////////////////////////////
diff --git a/src/actions/sigAction.vala b/src/actions/sigAction.vala
index cec9836..1edbc08 100644
--- a/src/actions/sigAction.vala
+++ b/src/actions/sigAction.vala
@@ -47,8 +47,8 @@ public class SigAction : Action {
/// C'tor, initializes all members.
/////////////////////////////////////////////////////////////////////
- public SigAction(string name, string icon, string command, bool is_quick_action = false) {
- GLib.Object(name : name, icon : icon, real_command : command, is_quick_action : is_quick_action);
+ 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);
}
/////////////////////////////////////////////////////////////////////
diff --git a/src/actions/uriAction.vala b/src/actions/uriAction.vala
index 25d5c75..f407f6c 100644
--- a/src/actions/uriAction.vala
+++ b/src/actions/uriAction.vala
@@ -29,10 +29,14 @@ public class UriAction : Action {
/// used in the pies.conf file for this kind of Actions.
/////////////////////////////////////////////////////////////////////
- public static void register(out string name, out bool icon_name_editable, out string settings_name) {
- name = _("Open URI");
- icon_name_editable = true;
- settings_name = "uri";
+ 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;
}
/////////////////////////////////////////////////////////////////////
@@ -51,8 +55,10 @@ public class UriAction : Action {
/// C'tor, initializes all members.
/////////////////////////////////////////////////////////////////////
- public UriAction(string name, string icon, string command, bool is_quick_action = false) {
- GLib.Object(name : name, icon : icon, real_command : command, is_quick_action : is_quick_action);
+ 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);
}
/////////////////////////////////////////////////////////////////////
diff --git a/src/deamon.vala b/src/deamon.vala
index 0cdb4c2..cec9539 100644
--- a/src/deamon.vala
+++ b/src/deamon.vala
@@ -15,11 +15,6 @@ You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/////////////////////////////////////////////////////////////////////
-/// TODO-List (need comments):
-/// PieList
-/////////////////////////////////////////////////////////////////////
-
namespace GnomePie {
/////////////////////////////////////////////////////////////////////////
@@ -36,6 +31,7 @@ public class Deamon : GLib.Object {
public static int main(string[] args) {
Logger.init();
+ Gdk.threads_init();
Gtk.init(ref args);
Paths.init();
@@ -100,7 +96,11 @@ public class Deamon : GLib.Object {
// create unique application
var app = new Unique.App("org.gnome.gnomepie", null);
- if (app.is_running) {
+ #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 + ".");
@@ -120,27 +120,27 @@ public class Deamon : GLib.Object {
if (cmd == Unique.Command.ACTIVATE) {
var pie = data.get_text();
- if (pie != "") PieManager.open_pie(pie);
- else this.indicator.show_preferences();
+ if (pie != null && pie != "") PieManager.open_pie(pie);
+ else this.indicator.show_preferences();
return Unique.Response.OK;
}
return Unique.Response.PASSTHROUGH;
});
-
+
+ // init locale support
+ Intl.bindtextdomain ("gnomepie", Paths.locales);
+ Intl.textdomain ("gnomepie");
+
// init toolkits and static stuff
- Gdk.threads_init();
ActionRegistry.init();
GroupRegistry.init();
+
PieManager.init();
Icon.init();
ThemedIcon.init();
RenderedText.init();
-
- // init locale support
- Intl.bindtextdomain ("gnomepie", Paths.locales);
- Intl.textdomain ("gnomepie");
// launch the indicator
this.indicator = new Indicator();
diff --git a/src/gui/about.vala b/src/gui/aboutWindow.vala
index ce4256e..ccd956a 100644
--- a/src/gui/about.vala
+++ b/src/gui/aboutWindow.vala
@@ -18,12 +18,17 @@ this program. If not, see <http://www.gnu.org/licenses/>.
namespace GnomePie {
/////////////////////////////////////////////////////////////////////////
-/// A simple about Dialog.
+/// A simple about dialog.
/////////////////////////////////////////////////////////////////////////
-public class GnomePieAboutDialog: Gtk.AboutDialog {
-
- public GnomePieAboutDialog () {
+public class AboutWindow: Gtk.AboutDialog {
+
+ /////////////////////////////////////////////////////////////////////
+ /// C'tor, creates a new about dialog. The entries are sorted alpha-
+ /// betically.
+ /////////////////////////////////////////////////////////////////////
+
+ public AboutWindow () {
string[] devs = {
"Simon Schneegans <code@simonschneegans.de>",
"Francesco Piccinno <stack.box@gmail.com>"
@@ -32,11 +37,13 @@ public class GnomePieAboutDialog: Gtk.AboutDialog {
"Simon Schneegans <code@simonschneegans.de>"
};
string[] translators = {
- "DE\t\t Simon Schneegans <code@simonschneegans.de>",
- "IT\t\t Riccardo Traverso <gr3yfox.fw@gmail.com>",
- "PT-BR\t Magnun Leno <magnun@codecommunity.org>",
- "EN\t\t Simon Schneegans <code@simonschneegans.de>",
- "KO\t\t Kim Boram <Boramism@gmail.com>"
+ "Simon Schneegans <code@simonschneegans.de> (DE, EN)",
+ "Riccardo Traverso <gr3yfox.fw@gmail.com> (IT)",
+ "Magnun Leno <magnun@codecommunity.org> (PT-BR)",
+ "Kim Boram <Boramism@gmail.com> (KO)",
+ "Eduardo Anabalon <lalo1412@gmail.com> (ES)",
+ "Gregoire Bellon-Gervais <greggbg@gmail.com> (FR)",
+ "Eugene Roskin <pams@imail.ru> (RU)"
};
// sort translators
@@ -56,12 +63,12 @@ public class GnomePieAboutDialog: Gtk.AboutDialog {
artists : artists,
authors : devs,
translator_credits : translator_string,
- copyright : "Copyright (C) 2011 Simon Schneegans <code@simonschneegans.de>",
+ copyright : "Copyright (C) 2011-2012 Simon Schneegans <code@simonschneegans.de>",
program_name: "Gnome-Pie",
logo_icon_name: "gnome-pie",
website: "http://www.simonschneegans.de/?page_id=12",
website_label: "www.gnome-pie.simonschneegans.de",
- version: "0.3.1"
+ version: "0.4.0"
);
}
}
diff --git a/src/gui/cellRendererIcon.vala b/src/gui/cellRendererIcon.vala
deleted file mode 100644
index 959a0b7..0000000
--- a/src/gui/cellRendererIcon.vala
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
-Copyright (c) 2011 by Simon Schneegans
-
-This program is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the Free
-Software Foundation, either version 3 of the License, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-more details.
-
-You should have received a copy of the GNU General Public License along with
-this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-namespace GnomePie {
-
-/////////////////////////////////////////////////////////////////////////
-/// A cellrenderer which displays an Icon. When clicked onto, a window
-/// opens for selecting another icon. This needs to be a subclass of
-/// Gtk.CellRendererText because Gtk.CellRendererPixbuf can't receive
-/// click events. Internally it stores a Gtk.CellRendererPixbuf
-/// which renders and stuff.
-/////////////////////////////////////////////////////////////////////////
-
-public class CellRendererIcon : Gtk.CellRendererText {
-
- /////////////////////////////////////////////////////////////////////
- /// This signal is emitted when the user selects another icon.
- /////////////////////////////////////////////////////////////////////
-
- public signal void on_select(string path, string icon);
-
- /////////////////////////////////////////////////////////////////////
- /// The IconSelectWindow which is shown on click.
- /////////////////////////////////////////////////////////////////////
-
- private IconSelectWindow select_window = null;
-
- /////////////////////////////////////////////////////////////////////
- /// The internal Renderer used for drawing.
- /////////////////////////////////////////////////////////////////////
-
- private Gtk.CellRendererPixbuf renderer = null;
-
- /////////////////////////////////////////////////////////////////////
- /// A helper variable, needed to emit the current path.
- /////////////////////////////////////////////////////////////////////
-
- private string current_path = "";
-
- public string icon_name { get; set; }
-
- /////////////////////////////////////////////////////////////////////
- /// Forward some parts of the CellRendererPixbuf's interface.
- /////////////////////////////////////////////////////////////////////
-
- public bool follow_state {
- get { return renderer.follow_state; }
- set { renderer.follow_state = value; }
- }
-
- public bool icon_sensitive {
- get { return renderer.sensitive; }
- set { renderer.sensitive = value; }
- }
-
- public Gdk.Pixbuf pixbuf {
- owned get { return renderer.pixbuf; }
- set { renderer.pixbuf = value; }
- }
-
- /////////////////////////////////////////////////////////////////////
- /// C'tor, creates a new CellRendererIcon.
- /////////////////////////////////////////////////////////////////////
-
- public CellRendererIcon() {
- this.select_window = new IconSelectWindow();
- this.renderer = new Gtk.CellRendererPixbuf();
-
- this.select_window.on_select.connect((icon) => {
- this.on_select(current_path, icon);
- });
- }
-
- /////////////////////////////////////////////////////////////////////
- /// Forward some parts of the CellRendererPixbuf's interface.
- /////////////////////////////////////////////////////////////////////
-
- public override void get_size (Gtk.Widget widget, Gdk.Rectangle? cell_area,
- out int x_offset, out int y_offset,
- out int width, out int height) {
-
- this.renderer.get_size(widget, cell_area, out x_offset, out y_offset, out width, out height);
- }
-
- /////////////////////////////////////////////////////////////////////
- /// Forward some parts of the CellRendererPixbuf's interface.
- /////////////////////////////////////////////////////////////////////
-
- public override void render (Gdk.Window window, Gtk.Widget widget,
- Gdk.Rectangle bg_area,
- Gdk.Rectangle cell_area,
- Gdk.Rectangle expose_area,
- Gtk.CellRendererState flags) {
-
- this.renderer.render(window, widget, bg_area, cell_area, expose_area, flags);
- }
-
- /////////////////////////////////////////////////////////////////////
- /// Open the IconSelectWindow on click.
- /////////////////////////////////////////////////////////////////////
-
- public override unowned Gtk.CellEditable start_editing(
- Gdk.Event event, Gtk.Widget widget, string path, Gdk.Rectangle bg_area,
- Gdk.Rectangle cell_area, Gtk.CellRendererState flags) {
-
- this.select_window.set_transient_for((Gtk.Window)widget.get_toplevel());
- this.select_window.set_modal(true);
-
- this.current_path = path;
- this.select_window.show();
- this.select_window.active_icon = this.icon_name;
-
- return this.renderer.start_editing(event, widget, path, bg_area, cell_area, flags);
- }
-}
-
-}
-
diff --git a/src/gui/cellRendererTrigger.vala b/src/gui/cellRendererTrigger.vala
deleted file mode 100644
index a825c32..0000000
--- a/src/gui/cellRendererTrigger.vala
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
-Copyright (c) 2011 by Simon Schneegans
-
-This program is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the Free
-Software Foundation, either version 3 of the License, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-more details.
-
-You should have received a copy of the GNU General Public License along with
-this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-namespace GnomePie {
-
-/////////////////////////////////////////////////////////////////////////
-/// A CellRenderer which opens a TriggerSelectWindow.
-/////////////////////////////////////////////////////////////////////////
-
-public class CellRendererTrigger : Gtk.CellRendererText {
-
- /////////////////////////////////////////////////////////////////////
- /// This signal is emitted when the user selects another trigger.
- /////////////////////////////////////////////////////////////////////
-
- public signal void on_select(string path, Trigger trigger);
-
- /////////////////////////////////////////////////////////////////////
- /// The trigger which can be set with this window.
- /////////////////////////////////////////////////////////////////////
-
- public string trigger { get; set; }
-
- /////////////////////////////////////////////////////////////////////
- /// The IconSelectWindow which is shown on click.
- /////////////////////////////////////////////////////////////////////
-
- private TriggerSelectWindow select_window = null;
-
- /////////////////////////////////////////////////////////////////////
- /// A helper variable, needed to emit the current path.
- /////////////////////////////////////////////////////////////////////
-
- private string current_path = "";
-
- /////////////////////////////////////////////////////////////////////
- /// C'tor, creates a new CellRendererIcon.
- /////////////////////////////////////////////////////////////////////
-
- public CellRendererTrigger() {
- this.select_window = new TriggerSelectWindow();
-
- this.select_window.on_select.connect((trigger) => {
- this.trigger = trigger.name;
- this.on_select(current_path, trigger);
- });
- }
-
- /////////////////////////////////////////////////////////////////////
- /// Open the TriggerSelectWindow on click.
- /////////////////////////////////////////////////////////////////////
-
- public override unowned Gtk.CellEditable start_editing(
- Gdk.Event event, Gtk.Widget widget, string path, Gdk.Rectangle bg_area,
- Gdk.Rectangle cell_area, Gtk.CellRendererState flags) {
-
- this.current_path = path;
-
- this.select_window.set_transient_for((Gtk.Window)widget.get_toplevel());
- this.select_window.set_modal(true);
- this.select_window.set_trigger(new Trigger.from_string(this.trigger));
-
- this.select_window.show();
-
- return base.start_editing(event, widget, path, bg_area, cell_area, flags);
- }
-}
-
-}
-
diff --git a/src/gui/iconSelectWindow.vala b/src/gui/iconSelectWindow.vala
index 01a4a40..d66c654 100644
--- a/src/gui/iconSelectWindow.vala
+++ b/src/gui/iconSelectWindow.vala
@@ -23,45 +23,19 @@ namespace GnomePie {
/// happens in an extra thread and a spinner is displayed while loading.
/////////////////////////////////////////////////////////////////////////
-public class IconSelectWindow : Gtk.Dialog {
-
+public class IconSelectWindow : GLib.Object {
+
/////////////////////////////////////////////////////////////////////
- /// The currently selected icon. If set, this icon gets focused.
+ /// This signal gets emitted when the user selects a new icon.
/////////////////////////////////////////////////////////////////////
- private string _active_icon = "application-default-icon";
-
- public string active_icon {
- get {
- return _active_icon;
- }
- set {
- if (value.contains("/")) {
- this.file_chooser.set_filename(value);
- 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 == value) {
- 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 == value);
- });
-
- this.tabs.set_current_page(0);
- }
- }
- }
+ public signal void on_ok(string icon_name);
/////////////////////////////////////////////////////////////////////
- /// This signal gets emitted when the user selects a new icon.
+ /// Stores the currently selected icon.
/////////////////////////////////////////////////////////////////////
- public signal void on_select(string icon_name);
+ private string active_icon = "";
/////////////////////////////////////////////////////////////////////
/// The ListStore storing all theme-icons.
@@ -121,6 +95,12 @@ public class IconSelectWindow : Gtk.Dialog {
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.
/////////////////////////////////////////////////////////////////////
@@ -156,217 +136,221 @@ public class IconSelectWindow : Gtk.Dialog {
/// C'tor, creates a new IconSelectWindow.
/////////////////////////////////////////////////////////////////////
- public IconSelectWindow() {
- this.title = _("Choose an Icon");
- this.set_size_request(520, 520);
- this.delete_event.connect(hide_on_delete);
- this.load_queue = new GLib.AsyncQueue<ListEntry?>();
+ public IconSelectWindow(Gtk.Window parent) {
+ try {
+ this.load_queue = new GLib.AsyncQueue<ListEntry?>();
- 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;});
+ 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.visible) load_icons();
- else need_reload = true;
- });
- }
-
- // make the icon_view filterable
- this.icon_list_filtered = new Gtk.TreeModelFilter(this.icon_list, null);
-
- var container = new Gtk.VBox(false, 12);
- container.set_border_width(12);
+ // 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();
- // tab container
- this.tabs = new Gtk.Notebook();
+ builder.add_from_file (Paths.ui_files + "/icon_select.ui");
- // icon theme tab
- var theme_tab = new Gtk.VBox(false, 12);
- theme_tab.set_border_width(12);
+ 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();
- // type chooser combo-box
- var context_combo = new Gtk.ComboBox.text();
- 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"));
+ (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();
- });
-
- theme_tab.pack_start(context_combo, false, false);
+ 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);
- // string filter entry
- var filter = new Gtk.Entry();
- filter.primary_icon_stock = Gtk.Stock.FIND;
- filter.primary_icon_activatable = false;
- filter.secondary_icon_stock = Gtk.Stock.CLEAR;
- theme_tab.pack_start(filter, false, false);
-
- // only display items which have the selected type
- // and whose name contains the text entered in the entry
- this.icon_list_filtered.set_visible_func((model, iter) => {
- string name = "";
- IconContext context = IconContext.ALL;
- 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();
- });
+ if (name == null) return false;
- // container for the icon_view
- var scroll = new Gtk.ScrolledWindow (null, null);
- scroll.set_policy (Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
- scroll.set_shadow_type (Gtk.ShadowType.IN);
+ 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 = 3;
- this.icon_view.pixbuf_column = 2;
- this.icon_view.tooltip_column = 0;
-
- // set _active_icon if selection changes
- this.icon_view.selection_changed.connect(() => {
- foreach (var path in this.icon_view.get_selected_items()) {
- Gtk.TreeIter iter;
- this.icon_list_filtered.get_iter(out iter, path);
- 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_select(this._active_icon);
- this.hide();
- });
+ // displays the filtered icons
+ this.icon_view = new Gtk.IconView.with_model(this.icon_list_filtered);
+ this.icon_view.item_width = 32;
+ this.icon_view.item_padding = 3;
+ this.icon_view.pixbuf_column = 2;
+ this.icon_view.tooltip_column = 0;
- scroll.add(this.icon_view);
+ // 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);
+ }
+ });
- theme_tab.pack_start(scroll, true, true);
-
- tabs.append_page(theme_tab, new Gtk.Label(_("Icon Theme")));
+ // 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);
- // tab containing the possibility to choose a custom icon
- var custom_tab = new Gtk.VBox(false, 6);
- custom_tab.border_width = 12;
+ // file chooser widget
+ this.file_chooser = builder.get_object("filechooser") as Gtk.FileChooserWidget;
+ var file_filter = new Gtk.FileFilter();
+ file_filter.add_pixbuf_formats();
- // file chooser widget
- this.file_chooser = new Gtk.FileChooserWidget(Gtk.FileChooserAction.OPEN);
- 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"));
- 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_select(this._active_icon);
- this.hide();
- });
-
-
- custom_tab.pack_start(file_chooser, true, true);
-
- tabs.append_page(custom_tab, new Gtk.Label(_("Custom Icon")));
-
- container.pack_start(tabs, true, true);
-
- // button box --- this dialog has a custom button box at the bottom because it
- // should have a spinner there. Sadly that's impossible with the "normal"
- // action_area of Gtk.Dialog's
- var bottom_box = new Gtk.HBox(false, 0);
-
- var bbox = new Gtk.HButtonBox();
- bbox.set_spacing(6);
- bbox.set_layout(Gtk.ButtonBoxStyle.END);
-
- var cancel_button = new Gtk.Button.from_stock(Gtk.Stock.CANCEL);
- cancel_button.clicked.connect(() => {
- this.hide();
- });
- bbox.pack_start(cancel_button);
-
- var ok_button = new Gtk.Button.from_stock(Gtk.Stock.OK);
- ok_button.clicked.connect(() => {
- this.on_select(this._active_icon);
- this.hide();
- });
- bbox.pack_start(ok_button);
-
- bottom_box.pack_end(bbox, false);
+ #endif
- this.spinner = new Gtk.Spinner();
- this.spinner.set_size_request(16, 16);
- this.spinner.start();
+ 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))
- bottom_box.pack_start(this.spinner, false, false);
+ 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();
+ });
- container.pack_start(bottom_box, false, false);
-
- this.vbox.pack_start(container, true, true);
-
- this.vbox.show_all();
-
- this.set_focus(this.icon_view);
+ 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);
+ }
}
/////////////////////////////////////////////////////////////////////
- /// Hide the "normal" action_area when this window is shown. Reload
- /// all icons if necessary.
+ /// Displays the window. The icons are reloaded if neccessary.
/////////////////////////////////////////////////////////////////////
-
- public override void show() {
- base.show();
-
- // hide the "normal" action_area --- this Dialog has a custom set of
- // buttons containg the spinner
- this.action_area.hide();
+
+ public void show() {
+ this.window.show_all();
+ this.spinner.hide();
if (this.need_reload) {
this.need_reload = false;
this.load_icons();
}
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Makes the window select the icon of the given Pie.
+ /////////////////////////////////////////////////////////////////////
+
+ public void set_pie(string id) {
+ string icon = PieManager.all_pies[id].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();
}
/////////////////////////////////////////////////////////////////////
@@ -400,13 +384,13 @@ public class IconSelectWindow : Gtk.Dialog {
var new_entry = this.load_queue.pop();
Gtk.TreeIter current;
this.icon_list.append(out current);
- this.icon_list.set(current, 0, new_entry.name,
+ this.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) this.icon_list.set_sort_column_id(0, Gtk.SortType.ASCENDING);
+ if (!this.loading) this.icon_list.set_sort_column_id(0, Gtk.SortType.ASCENDING);
return loading;
});
@@ -439,12 +423,12 @@ public class IconSelectWindow : Gtk.Dialog {
default: break;
}
- try {
+ 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);
+ 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)
@@ -462,7 +446,7 @@ public class IconSelectWindow : Gtk.Dialog {
// hide the spinner
if (spinner != null)
- spinner.visible = this.loading;
+ spinner.visible = false;
return null;
}
diff --git a/src/gui/indicator.vala b/src/gui/indicator.vala
index 8033cb7..dea4d3c 100644
--- a/src/gui/indicator.vala
+++ b/src/gui/indicator.vala
@@ -38,7 +38,7 @@ public class Indicator : GLib.Object {
/// The Preferences Menu of Gnome-Pie.
/////////////////////////////////////////////////////////////////////
- private Preferences prefs { private get; private set; }
+ private PreferencesWindow prefs { private get; private set; }
/////////////////////////////////////////////////////////////////////
/// Returns true, when the indicator is currently visible.
@@ -73,7 +73,7 @@ public class Indicator : GLib.Object {
string icon = "indicator-applet";
try {
path = GLib.Path.get_dirname(GLib.FileUtils.read_link("/proc/self/exe"))+"/resources";
- icon = "gnome-pie-indicator";
+ icon = "gnome-pie";
} catch (GLib.FileError e) {
warning("Failed to get path of executable!");
}
@@ -86,23 +86,23 @@ public class Indicator : GLib.Object {
try {
var file = GLib.File.new_for_path(GLib.Path.build_filename(
GLib.Path.get_dirname(GLib.FileUtils.read_link("/proc/self/exe"))+"/resources",
- "gnome-pie-indicator.svg"
+ "gnome-pie.svg"
));
if (!file.query_exists())
- this.indicator.set_from_icon_name("gnome-pie-indicator");
+ this.indicator.set_from_icon_name("gnome-pie");
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("gnome-pie-indicator");
+ this.indicator.set_from_icon_name("gnome-pie");
}
this.menu = new Gtk.Menu();
var menu = this.menu;
#endif
- this.prefs = new Preferences();
+ this.prefs = new PreferencesWindow();
// preferences item
var item = new Gtk.ImageMenuItem.from_stock (Gtk.Stock.PREFERENCES, null);
@@ -117,7 +117,7 @@ public class Indicator : GLib.Object {
item = new Gtk.ImageMenuItem.from_stock (Gtk.Stock.ABOUT, null);
item.show();
item.activate.connect(() => {
- var about = new GnomePieAboutDialog();
+ var about = new AboutWindow();
about.run();
about.destroy();
});
diff --git a/src/gui/newSliceWindow.vala b/src/gui/newSliceWindow.vala
new file mode 100644
index 0000000..4e38376
--- /dev/null
+++ b/src/gui/newSliceWindow.vala
@@ -0,0 +1,394 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+namespace GnomePie {
+
+/////////////////////////////////////////////////////////////////////////
+/// A 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.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 (icon_window == null) {
+ icon_window = new IconSelectWindow(this.window);
+ icon_window.on_ok.connect((icon) => {
+ this.current_custom_icon = icon;
+ this.set_icon(icon);
+ });
+ }
+
+ icon_window.show();
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// 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;
+ }
+}
+
+}
diff --git a/src/gui/pieComboList.vala b/src/gui/pieComboList.vala
new file mode 100644
index 0000000..3b54944
--- /dev/null
+++ b/src/gui/pieComboList.vala
@@ -0,0 +1,155 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+namespace GnomePie {
+
+/////////////////////////////////////////////////////////////////////////
+/// A 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, "markup", 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);
+ }
+ }
+}
+
+}
diff --git a/src/gui/pieList.vala b/src/gui/pieList.vala
index 46970d5..bfcb832 100644
--- a/src/gui/pieList.vala
+++ b/src/gui/pieList.vala
@@ -17,1029 +17,226 @@ this program. If not, see <http://www.gnu.org/licenses/>.
namespace GnomePie {
-// A very complex Widget. This is by far the most ugly file of this project
-// but well, this list *is* complex... sorry ;)
+/////////////////////////////////////////////////////////////////////////
+/// A list, containing one entry for each existing Pie.
+/////////////////////////////////////////////////////////////////////////
class PieList : Gtk.TreeView {
- private Gtk.ListStore groups;
- private Gtk.ListStore pies;
- private Gtk.ListStore actions;
- private Gtk.TreeStore data;
+ /////////////////////////////////////////////////////////////////////
+ /// This signal gets emitted when the user selects a new Pie.
+ /////////////////////////////////////////////////////////////////////
- private const int small_icon = 24;
- private const int large_icon = 36;
+ public signal void on_select(string id);
- // data positions in the data ListStore
- private enum DataPos {IS_QUICKACTION, ICON, NAME, TYPE_ID, ACTION_TYPE,
- ICON_PIXBUF, FONT_WEIGHT, ICON_NAME_EDITABLE, QUICKACTION_VISIBLE, QUICKACTION_ACTIVATABLE,
- TYPE_VISIBLE, GROUP_VISIBLE, APP_VISIBLE, KEY_VISIBLE, PIE_VISIBLE,
- URI_VISIBLE, TRIGGER_VISIBLE, DISPLAY_COMMAND_GROUP, DISPLAY_COMMAND_APP,
- DISPLAY_COMMAND_KEY, DISPLAY_COMMAND_PIE, DISPLAY_COMMAND_URI,
- REAL_COMMAND_GROUP, REAL_COMMAND_PIE, REAL_COMMAND_KEY}
+ /////////////////////////////////////////////////////////////////////
+ /// Stores the data internally.
+ /////////////////////////////////////////////////////////////////////
- // data positions in the actions ListStore
- private enum ActionPos {NAME, TYPE, CAN_QUICKACTION, ICON_NAME_EDITABLE}
+ private Gtk.ListStore data;
+ private enum DataPos {ICON, ICON_NAME, NAME, ID}
- // data positions in the pies ListStore
- private enum PiePos {NAME, ID}
+ /////////////////////////////////////////////////////////////////////
+ /// Stores where a drag startet.
+ /////////////////////////////////////////////////////////////////////
- // data positions in the groups ListStore
- private enum GroupPos {NAME, TYPE, ICON}
+ 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();
- Gtk.TreeIter last;
-
- // group choices
- this.groups = new Gtk.ListStore(3, typeof(string), // group name
- typeof(string), // group type
- typeof(string)); // group icon
-
- // add all registered group types
- foreach (var type in GroupRegistry.types) {
- this.groups.append(out last);
- this.groups.set(last, GroupPos.NAME, GroupRegistry.names[type],
- GroupPos.TYPE, type.name(),
- GroupPos.ICON, GroupRegistry.icons[type]);
- }
-
- // pie choices
- this.pies = new Gtk.ListStore(2, typeof(string), // pie name
- typeof(string)); // pie id
-
- // action type choices
- this.actions = new Gtk.ListStore(4, typeof(string), // type name
- typeof(string), // action type
- typeof(bool), // can be quickaction
- typeof(bool)); // icon/name editable
-
- // add all registered action types
- foreach (var type in ActionRegistry.types) {
- this.actions.append(out last);
- this.actions.set(last, ActionPos.NAME, ActionRegistry.names[type],
- ActionPos.TYPE, type.name(),
- ActionPos.CAN_QUICKACTION, true,
- ActionPos.ICON_NAME_EDITABLE, ActionRegistry.icon_name_editables[type]);
- }
- // and one type for groups
- this.actions.append(out last);
- this.actions.set(last, ActionPos.NAME, _("Slice group"),
- ActionPos.TYPE, typeof(ActionGroup).name(),
- ActionPos.CAN_QUICKACTION, false,
- ActionPos.ICON_NAME_EDITABLE, false);
+ 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);
- // main data model
- this.data = new Gtk.TreeStore(25, typeof(bool), // is quickaction
- typeof(string), // icon
- typeof(string), // name
- typeof(string), // slice: type label, pie: "ID: %id"
- typeof(string), // typeof(action), typeof(ActionGroup).name() if group action, pie_id if Pie
-
- typeof(Gdk.Pixbuf), // icon pixbuf
- typeof(int), // font weight
-
- typeof(bool), // icon/name editable
-
- typeof(bool), // quickaction visible
- typeof(bool), // quickaction activatable
- typeof(bool), // type visible
- typeof(bool), // group renderer visible
- typeof(bool), // app renderer visible
- typeof(bool), // key renderer visible
- typeof(bool), // pie renderer visible
- typeof(bool), // uri renderer visible
- typeof(bool), // trigger renderer visible
-
- typeof(string), // display command group
- typeof(string), // display command app
- typeof(string), // display command key
- typeof(string), // display command pie
- typeof(string), // display command uri
-
- typeof(string), // real command group
- typeof(string), // real command pie
- typeof(string)); // real command key
-
-
this.set_model(this.data);
+ this.set_headers_visible(false);
this.set_grid_lines(Gtk.TreeViewGridLines.NONE);
- this.set_enable_tree_lines(false);
- this.set_reorderable(false);
- this.set_level_indentation(-10);
+ this.width_request = 170;
+ this.set_enable_search(false);
- // create the gui
- // icon column
- var icon_column = new Gtk.TreeViewColumn();
- icon_column.title = _("Icon");
- icon_column.expand = false;
-
- // quickaction checkbox
- var check_render = new Gtk.CellRendererToggle();
- check_render.activatable = true;
- check_render.radio = true;
- check_render.width = 15;
-
- check_render.toggled.connect((path) => {
- Gtk.TreeIter toggled;
- this.data.get_iter_from_string(out toggled, path);
-
- bool current = false;
- this.data.get(toggled, DataPos.IS_QUICKACTION, out current);
-
- // set all others off
- Gtk.TreeIter parent;
- this.data.iter_parent(out parent, toggled);
- string parent_pos = this.data.get_string_from_iter(parent);
- int child_count = this.data.iter_n_children(parent);
-
- for (int i=0; i<child_count; ++i) {
- Gtk.TreeIter child;
- this.data.get_iter_from_string(out child, "%s:%d".printf(parent_pos, i));
- this.data.set(child, DataPos.IS_QUICKACTION, false);
- }
-
- // toggle selected
- this.data.set(toggled, DataPos.IS_QUICKACTION, !current);
-
- this.update_pie(toggled);
- });
-
- icon_column.pack_start(check_render, false);
- icon_column.add_attribute(check_render, "activatable", DataPos.QUICKACTION_ACTIVATABLE);
- icon_column.add_attribute(check_render, "sensitive", DataPos.QUICKACTION_ACTIVATABLE);
- icon_column.add_attribute(check_render, "visible", DataPos.QUICKACTION_VISIBLE);
- icon_column.add_attribute(check_render, "active", DataPos.IS_QUICKACTION);
-
+ this.set_events(Gdk.EventMask.POINTER_MOTION_MASK);
- // icon
- var icon_render = new GnomePie.CellRendererIcon();
- icon_render.editable = true;
-
- icon_render.on_select.connect((path, icon_name) => {
- Gtk.TreeIter iter;
- this.data.get_iter_from_string(out iter, path);
- int icon_size = this.data.iter_depth(iter) == 0 ? this.large_icon : this.small_icon;
-
- this.data.set(iter, DataPos.ICON, icon_name);
- this.data.set(iter, DataPos.ICON_PIXBUF, this.load_icon(icon_name, icon_size));
-
- this.update_pie(iter);
- this.update_linked();
- });
-
- icon_column.pack_start(icon_render, false);
- icon_column.add_attribute(icon_render, "icon_name", DataPos.ICON);
- icon_column.add_attribute(icon_render, "pixbuf", DataPos.ICON_PIXBUF);
- icon_column.add_attribute(icon_render, "editable", DataPos.ICON_NAME_EDITABLE);
- icon_column.add_attribute(icon_render, "icon_sensitive", DataPos.ICON_NAME_EDITABLE);
-
- // command column
- var command_column = new Gtk.TreeViewColumn();
- command_column.title = _("Command");
- command_column.resizable = true;
- command_column.expand = true;
-
- // trigger
- var command_renderer_trigger = new CellRendererTrigger();
- command_renderer_trigger.editable = true;
- command_renderer_trigger.ellipsize = Pango.EllipsizeMode.END;
-
- command_renderer_trigger.on_select.connect((path, trigger) => {
- Gtk.TreeIter data_iter;
- this.data.get_iter_from_string(out data_iter, path);
-
- this.data.set(data_iter, DataPos.DISPLAY_COMMAND_KEY, trigger.label_with_specials);
- this.data.set(data_iter, DataPos.REAL_COMMAND_KEY, trigger.name);
-
- this.update_pie(data_iter);
- });
-
- command_column.pack_end(command_renderer_trigger, true);
- command_column.add_attribute(command_renderer_trigger, "weight", DataPos.FONT_WEIGHT);
- command_column.add_attribute(command_renderer_trigger, "markup", DataPos.DISPLAY_COMMAND_KEY);
- command_column.add_attribute(command_renderer_trigger, "visible", DataPos.TRIGGER_VISIBLE);
- command_column.add_attribute(command_renderer_trigger, "trigger", DataPos.REAL_COMMAND_KEY);
-
- // slice group
- var command_renderer_group = new Gtk.CellRendererCombo();
- command_renderer_group.editable = true;
- command_renderer_group.has_entry = false;
- command_renderer_group.text_column = 0;
- command_renderer_group.ellipsize = Pango.EllipsizeMode.END;
- command_renderer_group.model = this.groups;
-
- command_renderer_group.changed.connect((path, iter) => {
- string display_name;
- string type;
- string icon;
-
- this.groups.get(iter, GroupPos.NAME, out display_name);
- this.groups.get(iter, GroupPos.TYPE, out type);
- this.groups.get(iter, GroupPos.ICON, out icon);
-
- Gtk.TreeIter data_iter;
- this.data.get_iter_from_string(out data_iter, path);
-
- this.data.set(data_iter, DataPos.DISPLAY_COMMAND_GROUP, display_name);
- this.data.set(data_iter, DataPos.REAL_COMMAND_GROUP, type);
- this.data.set(data_iter, DataPos.NAME, display_name);
- this.data.set(data_iter, DataPos.ICON, icon);
-
- this.update_pie(data_iter);
- });
-
- command_column.pack_end(command_renderer_group, true);
- command_column.add_attribute(command_renderer_group, "weight", DataPos.FONT_WEIGHT);
- command_column.add_attribute(command_renderer_group, "text", DataPos.DISPLAY_COMMAND_GROUP);
- command_column.add_attribute(command_renderer_group, "visible", DataPos.GROUP_VISIBLE);
-
-
- // app action
- var command_renderer_app = new Gtk.CellRendererText();
- command_renderer_app.editable = true;
- command_renderer_app.ellipsize = Pango.EllipsizeMode.END;
-
- command_renderer_app.edited.connect((path, command) => {
- Gtk.TreeIter data_iter;
- this.data.get_iter_from_string(out data_iter, path);
-
- this.data.set(data_iter, DataPos.DISPLAY_COMMAND_APP, command);
-
- this.update_pie(data_iter);
- });
-
- command_column.pack_end(command_renderer_app, true);
- command_column.add_attribute(command_renderer_app, "weight", DataPos.FONT_WEIGHT);
- command_column.add_attribute(command_renderer_app, "text", DataPos.DISPLAY_COMMAND_APP);
- command_column.add_attribute(command_renderer_app, "visible", DataPos.APP_VISIBLE);
-
-
- // key action
- var command_renderer_key = new Gtk.CellRendererAccel();
- command_renderer_key.editable = true;
- command_renderer_key.ellipsize = Pango.EllipsizeMode.END;
-
- command_renderer_key.accel_edited.connect((path, key, mods) => {
- Gtk.TreeIter data_iter;
- this.data.get_iter_from_string(out data_iter, path);
-
- string label = Gtk.accelerator_get_label(key, mods);
- string accelerator = Gtk.accelerator_name(key, mods);
-
- this.data.set(data_iter, DataPos.DISPLAY_COMMAND_KEY, label);
- this.data.set(data_iter, DataPos.REAL_COMMAND_KEY, accelerator);
-
- this.update_pie(data_iter);
- });
-
- command_renderer_key.accel_cleared.connect((path) => {
- Gtk.TreeIter data_iter;
- this.data.get_iter_from_string(out data_iter, path);
-
- this.data.set(data_iter, DataPos.DISPLAY_COMMAND_KEY, _("Not bound"));
- this.data.set(data_iter, DataPos.REAL_COMMAND_KEY, "");
-
- this.update_pie(data_iter);
- });
-
- command_column.pack_end(command_renderer_key, true);
- command_column.add_attribute(command_renderer_key, "weight", DataPos.FONT_WEIGHT);
- command_column.add_attribute(command_renderer_key, "text", DataPos.DISPLAY_COMMAND_KEY);
- command_column.add_attribute(command_renderer_key, "visible", DataPos.KEY_VISIBLE);
-
-
- // pie action
- var command_renderer_pie = new Gtk.CellRendererCombo();
- command_renderer_pie.editable = true;
- command_renderer_pie.has_entry = false;
- command_renderer_pie.text_column = 0;
- command_renderer_pie.ellipsize = Pango.EllipsizeMode.END;
- command_renderer_pie.model = this.pies;
-
- command_renderer_pie.changed.connect((path, iter) => {
- string name;
- string id;
-
- this.pies.get(iter, PiePos.NAME, out name);
- this.pies.get(iter, PiePos.ID, out id);
-
- Gtk.TreeIter data_iter;
- this.data.get_iter_from_string(out data_iter, path);
-
- this.data.set(data_iter, DataPos.DISPLAY_COMMAND_PIE, name);
- this.data.set(data_iter, DataPos.REAL_COMMAND_PIE, id);
-
- this.update_pie(data_iter);
- this.update_linked();
- });
-
- command_column.pack_end(command_renderer_pie, true);
- command_column.add_attribute(command_renderer_pie, "weight", DataPos.FONT_WEIGHT);
- command_column.add_attribute(command_renderer_pie, "text", DataPos.DISPLAY_COMMAND_PIE);
- command_column.add_attribute(command_renderer_pie, "visible", DataPos.PIE_VISIBLE);
-
-
- // uri action
- var command_renderer_uri = new Gtk.CellRendererText();
- command_renderer_uri.editable = true;
- command_renderer_uri.ellipsize = Pango.EllipsizeMode.END;
-
- command_renderer_uri.edited.connect((path, uri) => {
- Gtk.TreeIter data_iter;
- this.data.get_iter_from_string(out data_iter, path);
-
- this.data.set(data_iter, DataPos.DISPLAY_COMMAND_URI, uri);
-
- this.update_pie(data_iter);
- });
-
- command_column.pack_end(command_renderer_uri, true);
- command_column.add_attribute(command_renderer_uri, "weight", DataPos.FONT_WEIGHT);
- command_column.add_attribute(command_renderer_uri, "text", DataPos.DISPLAY_COMMAND_URI);
- command_column.add_attribute(command_renderer_uri, "visible", DataPos.URI_VISIBLE);
-
-
- // type column
- var type_column = new Gtk.TreeViewColumn();
- type_column.title = _("Pie-ID / Action type");
- type_column.resizable = true;
- type_column.expand = false;
-
- var type_render = new Gtk.CellRendererCombo();
- type_render.editable = true;
- type_render.has_entry = false;
- type_render.model = actions;
- type_render.text_column = 0;
- type_render.ellipsize = Pango.EllipsizeMode.END;
-
- // change command_render's visibility accordingly
- type_render.changed.connect((path, iter) => {
- string text = "";
- string type;
- bool can_quickaction;
- bool icon_name_editable;
-
- this.actions.get(iter, ActionPos.NAME, out text);
- this.actions.get(iter, ActionPos.TYPE, out type);
- this.actions.get(iter, ActionPos.CAN_QUICKACTION, out can_quickaction);
- this.actions.get(iter, ActionPos.ICON_NAME_EDITABLE, out icon_name_editable);
-
- Gtk.TreeIter data_iter;
- this.data.get_iter_from_string(out data_iter, path);
-
- this.data.set(data_iter, DataPos.TYPE_ID, text);
- this.data.set(data_iter, DataPos.ACTION_TYPE, type);
- this.data.set(data_iter, DataPos.QUICKACTION_ACTIVATABLE, can_quickaction);
- this.data.set(data_iter, DataPos.ICON_NAME_EDITABLE, icon_name_editable);
-
- // set all command renderes invisible
- this.data.set(data_iter, DataPos.GROUP_VISIBLE, false);
- this.data.set(data_iter, DataPos.APP_VISIBLE, false);
- this.data.set(data_iter, DataPos.KEY_VISIBLE, false);
- this.data.set(data_iter, DataPos.PIE_VISIBLE, false);
- this.data.set(data_iter, DataPos.URI_VISIBLE, false);
-
- // set one visible
- int type_id = 0;
- if(type == typeof(AppAction).name()) type_id = 1;
- else if(type == typeof(KeyAction).name()) type_id = 2;
- else if(type == typeof(PieAction).name()) type_id = 3;
- else if(type == typeof(UriAction).name()) type_id = 4;
- else type_id = 0;
-
- this.data.set(data_iter, DataPos.GROUP_VISIBLE + type_id, true);
-
- this.update_linked();
- this.update_pie(data_iter);
-
- //this.set_cursor(new Gtk.TreePath.from_string(path), command_column, true);
- });
-
- type_column.pack_start(type_render, true);
- type_column.add_attribute(type_render, "sensitive", DataPos.TYPE_VISIBLE);
- type_column.add_attribute(type_render, "editable", DataPos.TYPE_VISIBLE);
- type_column.add_attribute(type_render, "text", DataPos.TYPE_ID);
-
- // name column
- var name_column = new Gtk.TreeViewColumn();
- name_column.title = _("Name");
- name_column.expand = true;
- name_column.resizable = true;
+ 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.editable = true;
name_render.ellipsize = Pango.EllipsizeMode.END;
-
- name_render.edited.connect((path, text) => {
- Gtk.TreeIter iter;
- this.data.get_iter_from_string(out iter, path);
-
- this.data.set(iter, DataPos.NAME, text);
-
- // try to change icon to a fitting one
- string icon;
- this.data.get(iter, DataPos.ICON, out icon);
- if (icon == "application-default-icon" && Gtk.IconTheme.get_default().has_icon(text.down())) {
- this.data.set(iter, DataPos.ICON, text.down());
- }
-
- this.update_pie(iter);
- this.update_linked();
-
- //this.set_cursor(new Gtk.TreePath.from_string(path), type_column, true);
- });
-
- name_column.pack_start(name_render, true);
- name_column.add_attribute(name_render, "weight", DataPos.FONT_WEIGHT);
- name_column.add_attribute(name_render, "text", DataPos.NAME);
- name_column.add_attribute(name_render, "sensitive", DataPos.ICON_NAME_EDITABLE);
- name_column.add_attribute(name_render, "editable", DataPos.ICON_NAME_EDITABLE);
-
- this.append_column(icon_column);
- this.append_column(name_column);
- this.append_column(type_column);
- this.append_column(command_column);
+ name_render.ellipsize_set = true;
+ main_column.pack_start(name_render, true);
- this.realize.connect(this.load);
-
- // context menu
- var menu = new Gtk.Menu();
-
- var item = new Gtk.ImageMenuItem.with_label(_("Add new Pie"));
- item.set_image(new Gtk.Image.from_stock(Gtk.Stock.ADD, Gtk.IconSize.MENU));
- item.activate.connect(this.add_empty_pie);
- menu.append(item);
-
- item = new Gtk.ImageMenuItem.with_label(_("Add new Slice"));
- item.set_image(new Gtk.Image.from_stock(Gtk.Stock.ADD, Gtk.IconSize.MENU));
- item.activate.connect(this.add_empty_slice);
- menu.append(item);
-
- var sepa = new Gtk.SeparatorMenuItem();
- menu.append(sepa);
-
- item = new Gtk.ImageMenuItem.with_label(_("Delete"));
- item.set_image(new Gtk.Image.from_stock(Gtk.Stock.DELETE, Gtk.IconSize.MENU));
- item.activate.connect(this.delete_selection);
- menu.append(item);
+ base.append_column(main_column);
- menu.show_all();
-
- this.button_press_event.connect((event) => {
- if (event.type == Gdk.EventType.BUTTON_PRESS && event.button == 3) {
- menu.popup(null, null, null, event.button, event.time);
- }
- return false;
- });
+ main_column.add_attribute(icon_render, "pixbuf", DataPos.ICON);
+ main_column.add_attribute(name_render, "markup", DataPos.NAME);
// setup drag'n'drop
Gtk.TargetEntry uri_source = {"text/uri-list", 0, 0};
Gtk.TargetEntry[] entries = { uri_source };
-
- this.drag_data_received.connect(this.on_dnd_received);
- this.drag_data_get.connect(this.on_dnd_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_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 selected;
- if (this.get_selection().get_selected(null, out selected)) {
- if (this.data.iter_depth(selected) == 0) {
- this.enable_model_drag_source(Gdk.ModifierType.BUTTON1_MASK, entries, Gdk.DragAction.LINK);
- } else {
- this.unset_rows_drag_source();
- }
+ 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);
}
});
- this.drag_begin.connect(() => {
- this.unset_rows_drag_dest();
- });
-
- this.drag_end.connect(() => {
- this.enable_model_drag_dest(entries, Gdk.DragAction.COPY | Gdk.DragAction.MOVE | Gdk.DragAction.LINK);
- });
+ reload_all();
}
- // moves the selected slice up
- public void selection_up() {
- Gtk.TreeIter selected;
- if (this.get_selection().get_selected(null, out selected)) {
- Gtk.TreePath path = this.data.get_path(selected);
- Gtk.TreeIter? before = null;;
- if (path.prev() && this.data.get_iter(out before, path)) {
- this.data.swap(selected, before);
- this.get_selection().changed();
- this.update_pie(selected);
- }
- }
- }
+ /////////////////////////////////////////////////////////////////////
+ /// Loads all existing Pies to the list.
+ /////////////////////////////////////////////////////////////////////
- // moves the selected slice down
- public void selection_down() {
- Gtk.TreeIter selected;
- if (this.get_selection().get_selected(null, out selected)) {
- Gtk.TreePath path = this.data.get_path(selected);
- Gtk.TreeIter? after = null;
- path.next();
- if (this.data.get_iter(out after, path)) {
- this.data.swap(selected, after);
- this.get_selection().changed();
- this.update_pie(selected);
- }
- }
- }
+ 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);
- // updates the entire list, checking for changed cross-references via PieActions
- // updates their names and icons if needed
- private void update_linked() {
- this.data.foreach((model, path, iter) => {
- string action_type;
- this.data.get(iter, DataPos.ACTION_TYPE, out action_type);
-
- if (action_type == typeof(PieAction).name()) {
- string command;
- this.data.get(iter, DataPos.REAL_COMMAND_PIE, out command);
-
- var referee = PieManager.all_pies[command];
-
- if (referee != null) {
- this.data.set(iter, DataPos.ICON, referee.icon);
- this.data.set(iter, DataPos.NAME, referee.name);
- this.data.set(iter, DataPos.ICON_PIXBUF, this.load_icon(referee.icon, this.small_icon));
- this.data.set(iter, DataPos.DISPLAY_COMMAND_PIE, referee.name);
- } else {
- // referenced Pie does not exist anymore or no is selected;
- // select the first one...
- Gtk.TreeIter first_pie;
- this.pies.get_iter_first(out first_pie);
-
- string name;
- string id;
-
- this.pies.get(first_pie, PiePos.NAME, out name);
- this.pies.get(first_pie, PiePos.ID, out id);
-
- this.data.set(iter, DataPos.DISPLAY_COMMAND_PIE, name);
- this.data.set(iter, DataPos.REAL_COMMAND_PIE, id);
-
- update_linked();
- }
- } else if (action_type == typeof(ActionGroup).name()) {
- string command;
- this.data.get(iter, DataPos.REAL_COMMAND_GROUP, out command);
-
- if (command == "") {
- // no group is selected, select the first one...
- Gtk.TreeIter first_group;
- this.groups.get_iter_first(out first_group);
-
- string name;
- string type;
- string icon;
-
- this.groups.get(first_group, GroupPos.NAME, out name);
- this.groups.get(first_group, GroupPos.TYPE, out type);
- this.groups.get(first_group, GroupPos.ICON, out icon);
-
- this.data.set(iter, DataPos.DISPLAY_COMMAND_GROUP, name);
- this.data.set(iter, DataPos.NAME, name);
- this.data.set(iter, DataPos.REAL_COMMAND_GROUP, type);
- this.data.set(iter, DataPos.ICON, icon);
- }
- }
-
- return false;
- });
+ data.clear();
+ foreach (var pie in PieManager.all_pies.entries) {
+ this.load_pie(pie.value);
+ }
+
+ select(id);
}
- // adds a new, empty pie to the list
- private void add_empty_pie() {
- var new_one = PieManager.create_persistent_pie(_("New Pie"), "application-default-icon", null);
-
- Gtk.TreeIter last;
- this.pies.append(out last); this.pies.set(last, 0, new_one.name, 1, new_one.id);
+ /////////////////////////////////////////////////////////////////////
+ /// Selects the first Pie.
+ /////////////////////////////////////////////////////////////////////
- Gtk.TreeIter parent;
- this.data.append(out parent, null);
- this.data.set(parent, DataPos.IS_QUICKACTION, false,
- DataPos.ICON, new_one.icon,
- DataPos.NAME, new_one.name,
- DataPos.TYPE_ID, "ID: " + new_one.id,
- DataPos.ACTION_TYPE, new_one.id,
- DataPos.ICON_PIXBUF, this.load_icon(new_one.icon, this.large_icon),
- DataPos.FONT_WEIGHT, 800,
- DataPos.ICON_NAME_EDITABLE, true,
- DataPos.QUICKACTION_VISIBLE, false,
- DataPos.QUICKACTION_ACTIVATABLE, false,
- DataPos.TYPE_VISIBLE, false,
- DataPos.GROUP_VISIBLE, false,
- DataPos.APP_VISIBLE, false,
- DataPos.KEY_VISIBLE, false,
- DataPos.PIE_VISIBLE, false,
- DataPos.URI_VISIBLE, false,
- DataPos.TRIGGER_VISIBLE, true,
- DataPos.DISPLAY_COMMAND_GROUP, "",
- DataPos.DISPLAY_COMMAND_APP, "",
- DataPos.DISPLAY_COMMAND_KEY, PieManager.get_accelerator_label_of(new_one.id),
- DataPos.DISPLAY_COMMAND_PIE, "",
- DataPos.DISPLAY_COMMAND_URI, "",
- DataPos.REAL_COMMAND_GROUP, "",
- DataPos.REAL_COMMAND_PIE, "",
- DataPos.REAL_COMMAND_KEY, PieManager.get_accelerator_of(new_one.id));
-
+ public void select_first() {
+ Gtk.TreeIter active;
- this.get_selection().select_iter(parent);
- this.scroll_to_cell(this.data.get_path(parent), null, true, 0.5f, 0.0f);
- }
-
- // adds a new empty slice to the list
- private void add_empty_slice() {
- Gtk.TreeIter selected;
- if (this.get_selection().get_selected(null, out selected)) {
- var path = this.data.get_path(selected);
- if (path != null) {
- if (path.get_depth() == 2)
- this.data.iter_parent(out selected, selected);
-
- this.load_action(selected, new AppAction(_("New Action"), "application-default-icon", ""));
-
- Gtk.TreeIter new_one;
- this.data.iter_nth_child(out new_one, selected, this.data.iter_n_children(selected)-1);
- this.expand_to_path(this.data.get_path(new_one));
- this.get_selection().select_iter(new_one);
- this.scroll_to_cell(this.data.get_path(new_one), null, true, 0.5f, 0.0f);
-
- this.update_pie(selected);
- }
+ 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 {
- var dialog = new Gtk.MessageDialog((Gtk.Window)this.get_toplevel(), Gtk.DialogFlags.MODAL,
- Gtk.MessageType.INFO,
- Gtk.ButtonsType.CLOSE,
- _("You have to select a Pie to add a Slice to!"));
- dialog.run();
- dialog.destroy();
+ this.on_select("");
}
}
- // writes the contents of action to the position pointed by slice
- private void write_action(Action action, Gtk.TreeIter slice) {
- this.data.set(slice, DataPos.IS_QUICKACTION, action.is_quick_action,
- DataPos.ICON, action.icon,
- DataPos.NAME, action.name,
- DataPos.TYPE_ID, ActionRegistry.names[action.get_type()],
- DataPos.ACTION_TYPE, action.get_type().name(),
- DataPos.ICON_PIXBUF, this.load_icon(action.icon, this.small_icon),
- DataPos.FONT_WEIGHT, 400,
- DataPos.ICON_NAME_EDITABLE, !(action is PieAction),
- DataPos.QUICKACTION_VISIBLE, true,
- DataPos.QUICKACTION_ACTIVATABLE, true,
- DataPos.TYPE_VISIBLE, true,
- DataPos.GROUP_VISIBLE, false,
- DataPos.TRIGGER_VISIBLE, false,
- DataPos.APP_VISIBLE, action is AppAction,
- DataPos.KEY_VISIBLE, action is KeyAction,
- DataPos.PIE_VISIBLE, action is PieAction,
- DataPos.URI_VISIBLE, action is UriAction,
- DataPos.DISPLAY_COMMAND_GROUP, "",
- DataPos.DISPLAY_COMMAND_APP, (action is AppAction) ? action.display_command : "",
- DataPos.DISPLAY_COMMAND_KEY, (action is KeyAction) ? action.display_command : _("Not bound"),
- DataPos.DISPLAY_COMMAND_PIE, (action is PieAction) ? action.display_command : "",
- DataPos.DISPLAY_COMMAND_URI, (action is UriAction) ? action.display_command : "",
- DataPos.REAL_COMMAND_GROUP, "",
- DataPos.REAL_COMMAND_PIE, (action is PieAction) ? action.real_command : "",
- DataPos.REAL_COMMAND_KEY, (action is KeyAction) ? action.real_command : "");
- }
+ /////////////////////////////////////////////////////////////////////
+ /// Selects the Pie with the given ID.
+ /////////////////////////////////////////////////////////////////////
- // deletes the currently selected pie or slice
- private void delete_selection() {
- Gtk.TreeIter selected;
- if (this.get_selection().get_selected(null, out selected)) {
- var path = this.data.get_path(selected);
- if (path != null) {
- if (path.get_depth() == 1)
- this.delete_pie(selected);
- else
- this.delete_slice(selected);
- }
- } else {
- var dialog = new Gtk.MessageDialog((Gtk.Window)this.get_toplevel(), Gtk.DialogFlags.MODAL,
- Gtk.MessageType.INFO,
- Gtk.ButtonsType.CLOSE,
- _("You have to select a Pie or a Slice to delete!"));
- dialog.run();
- dialog.destroy();
- }
- }
-
- // deletes the given pie
- private void delete_pie(Gtk.TreeIter pie) {
- var dialog = new Gtk.MessageDialog((Gtk.Window)this.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) {
- string id;
- this.data.get(pie, DataPos.ACTION_TYPE, out id);
- this.data.remove(pie);
- PieManager.remove_pie(id);
-
- this.pies.foreach((model, path, iter) => {
- string pies_id;
- this.pies.get(iter, PiePos.ID, out pies_id);
-
- if (id == pies_id) {
- this.pies.remove(iter);
- return true;
- }
-
- return false;
- });
-
- this.update_linked();
- }
- });
-
- dialog.run();
- dialog.destroy();
- }
-
- // deletes the given slice
- private void delete_slice(Gtk.TreeIter slice) {
- var dialog = new Gtk.MessageDialog((Gtk.Window)this.get_toplevel(), Gtk.DialogFlags.MODAL,
- Gtk.MessageType.QUESTION,
- Gtk.ButtonsType.YES_NO,
- _("Do you really want to delete the selected Slice?"));
-
- dialog.response.connect((response) => {
- if (response == Gtk.ResponseType.YES) {
- Gtk.TreeIter parent;
- this.data.iter_parent(out parent, slice);
- this.data.remove(slice);
- this.update_pie(parent);
+ 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;
});
-
- dialog.run();
- dialog.destroy();
}
- // loads all pies to the list
- private void load() {
- foreach (var pie in PieManager.all_pies.entries) {
- this.load_pie(pie.value);
- }
- }
+ /////////////////////////////////////////////////////////////////////
+ /// Loads one given pie to the list.
+ /////////////////////////////////////////////////////////////////////
- // loads one given pie to the list
private void load_pie(Pie pie) {
if (pie.id.length == 3) {
-
Gtk.TreeIter last;
- this.pies.append(out last); this.pies.set(last, PiePos.NAME, pie.name,
- PiePos.ID, pie.id);
-
- Gtk.TreeIter parent;
- this.data.append(out parent, null);
- this.data.set(parent, DataPos.IS_QUICKACTION, false,
- DataPos.ICON, pie.icon,
- DataPos.NAME, pie.name,
- DataPos.TYPE_ID, "ID: " + pie.id,
- DataPos.ACTION_TYPE, pie.id,
- DataPos.ICON_PIXBUF, this.load_icon(pie.icon, this.large_icon),
- DataPos.FONT_WEIGHT, 800,
- DataPos.ICON_NAME_EDITABLE, true,
- DataPos.QUICKACTION_VISIBLE, false,
- DataPos.QUICKACTION_ACTIVATABLE, false,
- DataPos.TYPE_VISIBLE, false,
- DataPos.GROUP_VISIBLE, false,
- DataPos.APP_VISIBLE, false,
- DataPos.KEY_VISIBLE, false,
- DataPos.PIE_VISIBLE, false,
- DataPos.URI_VISIBLE, false,
- DataPos.TRIGGER_VISIBLE, true,
- DataPos.DISPLAY_COMMAND_GROUP, "",
- DataPos.DISPLAY_COMMAND_APP, "",
- DataPos.DISPLAY_COMMAND_KEY, PieManager.get_accelerator_label_of(pie.id),
- DataPos.DISPLAY_COMMAND_PIE, "",
- DataPos.DISPLAY_COMMAND_URI, "",
- DataPos.REAL_COMMAND_GROUP, "",
- DataPos.REAL_COMMAND_PIE, "",
- DataPos.REAL_COMMAND_KEY, PieManager.get_accelerator_of(pie.id));
-
- foreach (var group in pie.action_groups) {
- this.load_group(parent, group);
- }
+ 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);
}
}
- // loads a given group
- private void load_group(Gtk.TreeIter parent, ActionGroup group) {
- if (group.get_type() == typeof(ActionGroup)) {
- foreach (var action in group.actions) {
- this.load_action(parent, action);
- }
- } else {
- Gtk.TreeIter child;
- this.data.append(out child, parent);
- this.data.set(child, DataPos.IS_QUICKACTION, false,
- DataPos.ICON, GroupRegistry.icons[group.get_type()],
- DataPos.NAME, GroupRegistry.names[group.get_type()],
- DataPos.TYPE_ID, _("Slice group"),
- DataPos.ACTION_TYPE, typeof(ActionGroup).name(),
- DataPos.ICON_PIXBUF, this.load_icon(GroupRegistry.icons[group.get_type()], this.small_icon),
- DataPos.FONT_WEIGHT, 400,
- DataPos.ICON_NAME_EDITABLE, false,
- DataPos.QUICKACTION_VISIBLE, true,
- DataPos.QUICKACTION_ACTIVATABLE, false,
- DataPos.TYPE_VISIBLE, true,
- DataPos.GROUP_VISIBLE, true,
- DataPos.APP_VISIBLE, false,
- DataPos.KEY_VISIBLE, false,
- DataPos.PIE_VISIBLE, false,
- DataPos.URI_VISIBLE, false,
- DataPos.TRIGGER_VISIBLE, false,
- DataPos.DISPLAY_COMMAND_GROUP, GroupRegistry.names[group.get_type()],
- DataPos.DISPLAY_COMMAND_APP, "",
- DataPos.DISPLAY_COMMAND_KEY, _("Not bound"),
- DataPos.DISPLAY_COMMAND_PIE, "",
- DataPos.DISPLAY_COMMAND_URI, "",
- DataPos.REAL_COMMAND_GROUP, group.get_type().name(),
- DataPos.REAL_COMMAND_PIE, "",
- DataPos.REAL_COMMAND_KEY, "");
+ /////////////////////////////////////////////////////////////////////
+ /// 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"});
}
}
- // loads a given slice
- private void load_action(Gtk.TreeIter parent, Action action) {
- Gtk.TreeIter child;
- this.data.append(out child, parent);
- this.write_action(action, child);
- }
+ /////////////////////////////////////////////////////////////////////
+ /// Called when a drag operation is started on this Widget.
+ /////////////////////////////////////////////////////////////////////
- // applies all changes done to the given pie
- private void update_pie(Gtk.TreeIter slice_or_pie) {
- // get pie iter
- var path = this.data.get_path(slice_or_pie);
- if (path != null) {
- var pie = slice_or_pie;
- if (path.get_depth() == 2)
- this.data.iter_parent(out pie, slice_or_pie);
+ 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);
- // get information on pie
- string id;
- string icon;
- string name;
- string hotkey;
-
- this.data.get(pie, DataPos.ICON, out icon);
- this.data.get(pie, DataPos.NAME, out name);
- this.data.get(pie, DataPos.ACTION_TYPE, out id);
- this.data.get(pie, DataPos.REAL_COMMAND_KEY, out hotkey);
-
- // remove pie
- PieManager.remove_pie(id);
-
- this.pies.foreach((model, path, iter) => {
- string pies_id;
- this.pies.get(iter, PiePos.ID, out pies_id);
-
- if (id == pies_id) {
- this.pies.set(iter, PiePos.NAME, name);
- return true;
- }
-
- return false;
- });
-
- // create new pie
- var new_pie = PieManager.create_persistent_pie(name, icon, new Trigger.from_string(hotkey), id);
-
- // add actions accordingly
- if (this.data.iter_has_child(pie)) {
- Gtk.TreeIter child;
- this.data.iter_children(out child, pie);
-
- do {
- // get slice information
- string slice_type;
- string slice_icon;
- string slice_name;
- bool is_quick_action;
-
- this.data.get(child, DataPos.ICON, out slice_icon);
- this.data.get(child, DataPos.NAME, out slice_name);
- this.data.get(child, DataPos.ACTION_TYPE, out slice_type);
- this.data.get(child, DataPos.IS_QUICKACTION, out is_quick_action);
-
- if (slice_type == typeof(AppAction).name()) {
- string slice_command;
- this.data.get(child, DataPos.DISPLAY_COMMAND_APP, out slice_command);
- var group = new ActionGroup(new_pie.id);
- group.add_action(new AppAction(slice_name, slice_icon, slice_command, is_quick_action));
- new_pie.add_group(group);
- } else if (slice_type == typeof(KeyAction).name()) {
- string slice_command;
- this.data.get(child, DataPos.REAL_COMMAND_KEY, out slice_command);
- var group = new ActionGroup(new_pie.id);
- group.add_action(new KeyAction(slice_name, slice_icon, slice_command, is_quick_action));
- new_pie.add_group(group);
- } else if (slice_type == typeof(PieAction).name()) {
- string slice_command;
- this.data.get(child, DataPos.REAL_COMMAND_PIE, out slice_command);
- var group = new ActionGroup(new_pie.id);
- group.add_action(new PieAction(slice_command, is_quick_action));
- new_pie.add_group(group);
- } else if (slice_type == typeof(UriAction).name()) {
- string slice_command;
- this.data.get(child, DataPos.DISPLAY_COMMAND_URI, out slice_command);
- var group = new ActionGroup(new_pie.id);
- group.add_action(new UriAction(slice_name, slice_icon, slice_command, is_quick_action));
- new_pie.add_group(group);
- } else if (slice_type == typeof(ActionGroup).name()) {
- string slice_command;
- this.data.get(child, DataPos.REAL_COMMAND_GROUP, out slice_command);
-
- var group = GLib.Object.new(GLib.Type.from_name(slice_command), "parent_id", new_pie.id);
- new_pie.add_group(group as ActionGroup);
- }
-
- } while (this.data.iter_next(ref child));
- }
- }
+ 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);
+ }
}
- // creates new action when the list receives a drag'n'drop event
- private void on_dnd_received(Gdk.DragContext context, int x, int y, Gtk.SelectionData selection_data, uint info, uint time_) {
- string[] uris = selection_data.get_uris();
-
+ /////////////////////////////////////////////////////////////////////
+ /// 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;
- Gtk.TreeViewDropPosition pos;
- // check for valid position
- if (!this.get_dest_row_at_pos(x, y, out path, out pos)
- || (path.to_string() == "0" && pos == Gtk.TreeViewDropPosition.BEFORE)) {
-
- warning("Failed to insert Slice: Invalid location!");
- return;
- }
-
- // get position to insert (when child: after, when parent: as first child)
- Gtk.TreeIter parent;
- int insert_pos = 0;
- if (path.get_depth() == 1) {
- if (pos == Gtk.TreeViewDropPosition.BEFORE) {
- path.prev();
- this.data.get_iter(out parent, path);
- insert_pos = this.data.iter_n_children(parent);
- } else {
- this.data.get_iter(out parent, path);
- }
- } else {
- if (pos == Gtk.TreeViewDropPosition.BEFORE) {
- insert_pos = path.get_indices()[1];
- } else {
- insert_pos = path.get_indices()[1]+1;
- }
-
- path.up();
- this.data.get_iter(out parent, path);
- }
+ if (!this.get_dest_row_at_pos(x, y, out path, out position))
+ return false;
- foreach (var uri in uris) {
- Gtk.TreeIter new_child;
- this.data.insert(out new_child, parent, insert_pos);
- this.write_action(ActionRegistry.new_for_uri(uri), new_child);
- }
+ 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);
- this.update_pie(parent);
- }
-
- private void on_dnd_source(Gdk.DragContext context, Gtk.SelectionData selection_data, uint info, uint time_) {
- Gtk.TreeIter selected;
- if (this.get_selection().get_selected(null, out selected)) {
- string id = "";
- this.data.get(selected, DataPos.ACTION_TYPE, out id);
- selection_data.set_uris({"file://" + Paths.launchers + "/" + id + ".desktop"});
- }
- }
-
- private Gdk.Pixbuf load_icon(string name, int size) {
- Gdk.Pixbuf pixbuf = null;
+ // avoid too frequent selection...
+ this.last_hover = time;
- try {
- if (name.contains("/"))
- pixbuf = new Gdk.Pixbuf.from_file_at_size(name, size, size);
- else
- pixbuf = new Gdk.Pixbuf.from_file_at_size(Icon.get_icon_file(name, size), size, size);
- } catch (GLib.Error e) {
- warning(e.message);
- }
+ GLib.Timeout.add(150, () => {
+ if (this.last_hover == time)
+ this.get_selection().select_path(path);
+ return false;
+ });
- return pixbuf;
+ return true;
}
}
diff --git a/src/gui/piePreview.vala b/src/gui/piePreview.vala
new file mode 100644
index 0000000..5745fcb
--- /dev/null
+++ b/src/gui/piePreview.vala
@@ -0,0 +1,369 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+namespace GnomePie {
+
+/////////////////////////////////////////////////////////////////////////
+/// A 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;
+
+ /////////////////////////////////////////////////////////////////////
+ /// 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[0]);
+ this.renderer.load_pie(PieManager.all_pies[id]);
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// 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();
+ 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") {
+ 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);
+ }
+ });
+ }
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// 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);
+ }
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// 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);
+ }
+ }
+
+}
+
+}
diff --git a/src/gui/piePreviewAddSign.vala b/src/gui/piePreviewAddSign.vala
new file mode 100644
index 0000000..ee8c14b
--- /dev/null
+++ b/src/gui/piePreviewAddSign.vala
@@ -0,0 +1,220 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+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);
+ }
+ }
+}
+
+}
diff --git a/src/gui/piePreviewCenter.vala b/src/gui/piePreviewCenter.vala
new file mode 100644
index 0000000..21bbd78
--- /dev/null
+++ b/src/gui/piePreviewCenter.vala
@@ -0,0 +1,108 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+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();
+ }
+}
+
+}
diff --git a/src/gui/piePreviewDeleteSign.vala b/src/gui/piePreviewDeleteSign.vala
new file mode 100644
index 0000000..2ff3321
--- /dev/null
+++ b/src/gui/piePreviewDeleteSign.vala
@@ -0,0 +1,195 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+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;
+ }
+}
+
+}
diff --git a/src/gui/piePreviewRenderer.vala b/src/gui/piePreviewRenderer.vala
new file mode 100644
index 0000000..1cf83ff
--- /dev/null
+++ b/src/gui/piePreviewRenderer.vala
@@ -0,0 +1,436 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+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<PiePreviewSliceRenderer?> 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<PiePreviewSliceRenderer?>();
+ 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<this.slices.size; ++i)
+ if (slices[i].on_mouse_move(this.angle, x, y) && !this.drag_n_drop_mode) {
+ this.active_slice = i;
+ delete_hovered = slices[i].delete_hovered;
+ }
+
+ if (this.drag_n_drop_mode) this.update_center(CenterDisplay.DROP);
+ else if (this.active_slice < 0) this.update_center(CenterDisplay.ADD);
+ else if (delete_hovered) this.update_center(CenterDisplay.DELETE);
+ else this.update_center(CenterDisplay.ACTIVE_SLICE);
+
+ this.add_sign.on_mouse_move(this.angle);
+
+ this.update_positions();
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Called when a mouse button is pressed over this renderer.
+ /////////////////////////////////////////////////////////////////////
+
+ public void on_button_press() {
+ for (int i=0; i<this.slices.size; ++i)
+ this.slices[i].on_button_press(this.mouse_x, this.mouse_y);
+ this.add_sign.on_button_press(this.mouse_x, this.mouse_y);
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Called when a mouse button is released over this renderer.
+ /////////////////////////////////////////////////////////////////////
+
+ public void on_button_release() {
+ for (int i=0; i<this.slices.size; ++i)
+ this.slices[i].on_button_release(this.mouse_x, this.mouse_y);
+ this.add_sign.on_button_release(this.mouse_x, this.mouse_y);
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Adds a new Slice to the renderer.
+ /////////////////////////////////////////////////////////////////////
+
+ public void add_group(ActionGroup group, int at_position = -1) {
+ var renderer = new PiePreviewSliceRenderer(this);
+ renderer.load(group);
+ this.add_slice_renderer(renderer, at_position);
+ this.connect_siganls(renderer);
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Removes a Slice from the renderer.
+ /////////////////////////////////////////////////////////////////////
+
+ public void remove_group(int index) {
+ if (this.slices.size > 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<this.slices.size; ++i) {
+ this.slices[i].set_position(i, smoothly);
+ }
+
+ } else if (this.drag_n_drop_mode) {
+ int add_position = 0;
+ add_position = (int)(this.angle/(2*PI)*this.slice_count() + 0.5) % this.slice_count();
+
+ for (int i=0; i<this.slices.size; ++i) {
+ this.slices[i].set_position(i >= add_position ? i+1 : i, smoothly);
+ }
+
+ this.update_center(CenterDisplay.DROP);
+
+ } else {
+ for (int i=0; i<this.slices.size; ++i) {
+ this.slices[i].set_position(i, smoothly);
+ }
+
+ if (this.active_slice < 0) this.update_center(CenterDisplay.NONE);
+ else this.update_center(CenterDisplay.ACTIVE_SLICE);
+ }
+ }
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Resizes all slices to their new sizes. This may happen smoothly
+ /// if desired.
+ /////////////////////////////////////////////////////////////////////
+
+ private void update_sizes() {
+ double size = 1.0;
+ if (this.slice_count() > 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<this.slices.size; ++i)
+ this.slices[i].set_size(size);
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Displays a new text in the middle of the preview.
+ /////////////////////////////////////////////////////////////////////
+
+ private void update_center(CenterDisplay display) {
+ switch (display) {
+ case CenterDisplay.ACTIVE_SLICE:
+ if (this.active_slice >= 0 && this.active_slice < this.slices.size)
+ this.center_renderer.set_text("<b>" + slices[this.active_slice].name + "</b>\n<small>"
+ + _("Click to edit") + "\n" + _("Drag to move") + "</small>");
+ break;
+ case CenterDisplay.ADD:
+ this.center_renderer.set_text("<small>" + _("Click to add a new Slice") + "</small>");
+ break;
+ case CenterDisplay.DROP:
+ if (hidden_group == null)
+ this.center_renderer.set_text("<small>" + _("Drop to add as new Slice") + "</small>");
+ else
+ this.center_renderer.set_text("<b>" + this.hidden_group.name + "</b>\n<small>"
+ + _("Drop to move Slice") + "</small>");
+ break;
+ case CenterDisplay.DELETE:
+ if (this.active_slice >= 0 && this.active_slice < this.slices.size)
+ this.center_renderer.set_text("<b>" + slices[this.active_slice].name + "</b>\n<small>"
+ + _("Click to delete") + "\n" + _("Drag to move") + "</small>");
+ break;
+ default:
+ this.center_renderer.set_text("");
+ break;
+ }
+ }
+}
+
+}
diff --git a/src/gui/piePreviewSliceRenderer.vala b/src/gui/piePreviewSliceRenderer.vala
new file mode 100644
index 0000000..af39c1f
--- /dev/null
+++ b/src/gui/piePreviewSliceRenderer.vala
@@ -0,0 +1,276 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+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);
+ }
+ }
+}
+
+}
diff --git a/src/gui/preferences.vala b/src/gui/preferences.vala
deleted file mode 100644
index 9444fac..0000000
--- a/src/gui/preferences.vala
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
-Copyright (c) 2011 by Simon Schneegans
-
-This program is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the Free
-Software Foundation, either version 3 of the License, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-more details.
-
-You should have received a copy of the GNU General Public License along with
-this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-namespace GnomePie {
-
-/////////////////////////////////////////////////////////////////////////
-/// The Gtk settings menu of Gnome-Pie.
-/////////////////////////////////////////////////////////////////////////
-
-public class Preferences : Gtk.Window {
-
- /////////////////////////////////////////////////////////////////////
- /// C'tor, constructs the whole dialog. Many thanks to the
- /// synapse-project, since some of this code is taken from there!
- /////////////////////////////////////////////////////////////////////
-
- public Preferences() {
- this.title = _("Gnome-Pie - Settings");
- this.set_position(Gtk.WindowPosition.CENTER);
- this.set_size_request(550, 550);
- this.resizable = false;
- this.icon_name = "gnome-pie";
- this.delete_event.connect(hide_on_delete);
-
- // main container
- var main_vbox = new Gtk.VBox(false, 12);
- main_vbox.border_width = 12;
- add(main_vbox);
-
- // tab container
- var tabs = new Gtk.Notebook();
-
- // general tab
- var general_tab = new Gtk.VBox(false, 6);
- general_tab.border_width = 12;
-
- // behavior frame
- var behavior_frame = new Gtk.Frame(null);
- behavior_frame.set_shadow_type(Gtk.ShadowType.NONE);
- var behavior_frame_label = new Gtk.Label(null);
- behavior_frame_label.set_markup(Markup.printf_escaped ("<b>%s</b>", _("Behavior")));
- behavior_frame.set_label_widget(behavior_frame_label);
-
- var behavior_vbox = new Gtk.VBox (false, 6);
- var align = new Gtk.Alignment (0.5f, 0.5f, 1.0f, 1.0f);
- align.set_padding (6, 12, 12, 12);
- align.add (behavior_vbox);
- behavior_frame.add (align);
-
- // Autostart checkbox
- var autostart = new Gtk.CheckButton.with_label (_("Startup on Login"));
- autostart.tooltip_text = _("If checked, Gnome-Pie will start when you log in.");
- autostart.active = Config.global.auto_start;
- autostart.toggled.connect(autostart_toggled);
- behavior_vbox.pack_start(autostart, false);
-
- // Indicator icon
- var indicator = new Gtk.CheckButton.with_label (_("Show Indicator"));
- indicator.tooltip_text = _("If checked, an indicator for easy access of the settings menu is shown in your panel.");
- indicator.active = Config.global.show_indicator;
- indicator.toggled.connect(indicator_toggled);
- behavior_vbox.pack_start(indicator, false);
-
- // Open Pies at Mouse
- var open_at_mouse = new Gtk.CheckButton.with_label (_("Open Pies at Mouse"));
- open_at_mouse.tooltip_text = _("If checked, pies will open at your pointer. Otherwise they'll pop up in the middle of the screen.");
- open_at_mouse.active = Config.global.open_at_mouse;
- open_at_mouse.toggled.connect(open_at_mouse_toggled);
- behavior_vbox.pack_start(open_at_mouse, false);
-
- // Slider
- var slider_hbox = new Gtk.HBox (false, 6);
- behavior_vbox.pack_start(slider_hbox);
-
- var scale_label = new Gtk.Label(_("Global Scale"));
- slider_hbox.pack_start(scale_label, false, false);
-
- var scale_slider = new Gtk.HScale.with_range(0.5, 2.0, 0.05);
- scale_slider.set_value(Config.global.global_scale);
- scale_slider.value_pos = Gtk.PositionType.RIGHT;
-
- 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;
- }
- });
-
- slider_hbox.pack_end(scale_slider, true, true);
-
- general_tab.pack_start (behavior_frame, false);
-
- // theme frame
- var theme_frame = new Gtk.Frame(null);
- theme_frame.set_shadow_type(Gtk.ShadowType.NONE);
- var theme_frame_label = new Gtk.Label(null);
- theme_frame_label.set_markup(Markup.printf_escaped("<b>%s</b>", _("Themes")));
- theme_frame.set_label_widget(theme_frame_label);
-
- // scrollable frame
- var scroll = new Gtk.ScrolledWindow (null, null);
- align = new Gtk.Alignment(0.5f, 0.5f, 1.0f, 1.0f);
- align.set_padding(6, 12, 12, 12);
- align.add(scroll);
- theme_frame.add(align);
-
- scroll.set_policy (Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
- scroll.set_shadow_type (Gtk.ShadowType.IN);
-
- // themes list
- var theme_list = new ThemeList();
- scroll.add(theme_list);
-
- general_tab.pack_start (theme_frame, true, true);
- tabs.append_page(general_tab, new Gtk.Label(_("General")));
-
- // pies tab
- var pies_tab = new Gtk.VBox(false, 6);
- pies_tab.border_width = 12;
- tabs.append_page(pies_tab, new Gtk.Label(_("Pies")));
-
- // scrollable frame
- scroll = new Gtk.ScrolledWindow (null, null);
- align = new Gtk.Alignment(0.5f, 0.5f, 1.0f, 1.0f);
- align.add(scroll);
- pies_tab.add(align);
-
- scroll.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
- scroll.set_shadow_type (Gtk.ShadowType.IN);
-
- // pies list
- var pie_list = new PieList();
- scroll.add(pie_list);
-
- // bottom box
- var info_box = new Gtk.HBox (false, 6);
-
- // info image
- var info_image = new Gtk.Image.from_stock (Gtk.Stock.INFO, Gtk.IconSize.MENU);
- info_box.pack_start (info_image, false);
-
- // info label
- var info_label = new TipViewer({
- _("You can right-click in the list for adding or removing entries."),
- _("You can reset Gnome-Pie to its default options with the terminal command \"gnome-pie --reset\"."),
- _("The radiobutton at the beginning of each slice-line indicates the QuickAction of the pie."),
- _("Pies can be opened with the terminal command \"gnome-pie --open=ID\"."),
- _("Feel free to visit Gnome-Pie's homepage at %s!").printf("<a href='http://gnome-pie.simonschneegans.de'>gnome-pie.simonschneegans.de</a>"),
- _("You can drag'n'drop applications from your main menu to the list above."),
- _("If you want to give some feedback, please write an e-mail to %s!").printf("<a href='mailto:code@simonschneegans.de'>code@simonschneegans.de</a>"),
- _("You may drag'n'drop URLs and bookmarks from your internet browser to the list above."),
- _("Bugs can be reported at %s!").printf("<a href='https://github.com/Simmesimme/Gnome-Pie'>Github</a>"),
- _("It's possible to drag'n'drop files and folders from your file browser to the list above."),
- _("It's recommended to keep your Pies small (at most 6-8 Slices). Else they will become hard to navigate."),
- _("In order to create a launcher for a Pie, drag the Pie from the list to your desktop!")
- });
- this.show.connect(info_label.start_slide_show);
- this.hide.connect(info_label.stop_slide_show);
-
- info_box.pack_start (info_label);
-
- // down Button
- var down_button = new Gtk.Button();
- down_button.tooltip_text = _("Moves the selected Slice down");
- down_button.sensitive = false;
- var down_image = new Gtk.Image.from_stock (Gtk.Stock.GO_DOWN, Gtk.IconSize.LARGE_TOOLBAR);
- down_button.add(down_image);
- down_button.clicked.connect (() => {
- pie_list.selection_down();
- });
-
- info_box.pack_end(down_button, false, false);
-
- // up Button
- var up_button = new Gtk.Button();
- up_button.tooltip_text = _("Moves the selected Slice up");
- up_button.sensitive = false;
- var up_image = new Gtk.Image.from_stock (Gtk.Stock.GO_UP, Gtk.IconSize.LARGE_TOOLBAR);
- up_button.add(up_image);
- up_button.clicked.connect (() => {
- pie_list.selection_up();
- });
-
- info_box.pack_end(up_button, false, false);
-
- pie_list.get_selection().changed.connect(() => {
- Gtk.TreeIter selected;
- if (pie_list.get_selection().get_selected(null, out selected)) {
- Gtk.TreePath path = pie_list.model.get_path(selected);
- if (path.get_depth() == 1) {
- up_button.sensitive = false;
- down_button.sensitive = false;
- } else {
- up_button.sensitive = true;
- down_button.sensitive = true;
-
- int child_pos = path.get_indices()[1];
-
- if (child_pos == 0)
- up_button.sensitive = false;
-
- path.up();
- Gtk.TreeIter parent_iter;
- pie_list.model.get_iter(out parent_iter, path);
- if (child_pos == pie_list.model.iter_n_children(parent_iter)-1)
- down_button.sensitive = false;
-
- }
- }
- });
-
- pies_tab.pack_start (info_box, false);
-
- main_vbox.pack_start(tabs);
-
- // close button
- var bbox = new Gtk.HButtonBox ();
- bbox.set_layout (Gtk.ButtonBoxStyle.END);
- var close_button = new Gtk.Button.from_stock(Gtk.Stock.CLOSE);
- close_button.clicked.connect (() => {
- hide();
- });
- bbox.pack_start (close_button);
-
- main_vbox.pack_start(bbox, false);
-
- main_vbox.show_all();
-
- this.hide.connect(() => {
- // save settings on close
- Config.global.save();
- Pies.save();
- });
- }
-
- /////////////////////////////////////////////////////////////////////
- /// Creates or deletes the autostart file. This code is inspired
- /// by project synapse as well.
- /////////////////////////////////////////////////////////////////////
-
- private void autostart_toggled(Gtk.ToggleButton check_box) {
- bool active = check_box.active;
- if (!active && FileUtils.test(Paths.autostart, FileTest.EXISTS)) {
- // delete the autostart file
- FileUtils.remove (Paths.autostart);
- }
- else if (active && !FileUtils.test(Paths.autostart, FileTest.EXISTS)) {
- string autostart_entry =
- "#!/usr/bin/env xdg-open\n" +
- "[Desktop Entry]\n" +
- "Name=Gnome-Pie\n" +
- "Exec=gnome-pie\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, 0, Gtk.MessageType.ERROR, Gtk.ButtonsType.CLOSE,
- "%s", e.message);
- d.run ();
- d.destroy ();
- }
- }
- }
-
- /////////////////////////////////////////////////////////////////////
- /// Shows or hides the indicator.
- /////////////////////////////////////////////////////////////////////
-
- private void indicator_toggled(Gtk.ToggleButton check_box) {
- var check = check_box as Gtk.CheckButton;
- Config.global.show_indicator = check.active;
- }
-
- /////////////////////////////////////////////////////////////////////
- /// Toggles whether the Pies are shown at the mouse or in the middle
- /// of the screen.
- /////////////////////////////////////////////////////////////////////
-
- private void open_at_mouse_toggled(Gtk.ToggleButton check_box) {
- var check = check_box as Gtk.CheckButton;
- Config.global.open_at_mouse = check.active;
- }
-}
-
-}
diff --git a/src/gui/preferencesWindow.vala b/src/gui/preferencesWindow.vala
new file mode 100644
index 0000000..022e44b
--- /dev/null
+++ b/src/gui/preferencesWindow.vala
@@ -0,0 +1,311 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+namespace GnomePie {
+
+/////////////////////////////////////////////////////////////////////////
+/// 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();
+ });
+
+ 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 = "application-default-icon";
+
+ 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"), "application-default-icon", 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();
+ }
+}
+
+}
diff --git a/src/gui/renameWindow.vala b/src/gui/renameWindow.vala
new file mode 100644
index 0000000..389b460
--- /dev/null
+++ b/src/gui/renameWindow.vala
@@ -0,0 +1,109 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+namespace GnomePie {
+
+/////////////////////////////////////////////////////////////////////////
+/// A 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();
+ }
+}
+
+}
diff --git a/src/gui/settingsWindow.vala b/src/gui/settingsWindow.vala
new file mode 100644
index 0000000..1eaa0b4
--- /dev/null
+++ b/src/gui/settingsWindow.vala
@@ -0,0 +1,174 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+namespace GnomePie {
+
+/////////////////////////////////////////////////////////////////////////
+/// 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;
+
+ /////////////////////////////////////////////////////////////////////
+ /// 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();
+
+ 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);
+
+ 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.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)) {
+ // delete the autostart file
+ FileUtils.remove (Paths.autostart);
+ }
+ else if (active && !FileUtils.test(Paths.autostart, FileTest.EXISTS)) {
+ string autostart_entry =
+ "#!/usr/bin/env xdg-open\n" +
+ "[Desktop Entry]\n" +
+ "Name=Gnome-Pie\n" +
+ "Exec=gnome-pie\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;
+ }
+}
+
+}
diff --git a/src/gui/sliceTypeList.vala b/src/gui/sliceTypeList.vala
new file mode 100644
index 0000000..541658e
--- /dev/null
+++ b/src/gui/sliceTypeList.vala
@@ -0,0 +1,172 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+namespace GnomePie {
+
+/////////////////////////////////////////////////////////////////////////
+/// A 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, "<b>" + description.name + "</b>\n"
+ + "<small>" + description.description + "</small>");
+ 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, "<b>" + description.name + "</b>\n"
+ + "<small>" + description.description + "</small>");
+ 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("", "application-default-icon");
+ }
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// 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;
+ });
+ }
+}
+
+}
diff --git a/src/gui/themeList.vala b/src/gui/themeList.vala
index 7eadcdb..62e0721 100644
--- a/src/gui/themeList.vala
+++ b/src/gui/themeList.vala
@@ -28,6 +28,12 @@ class ThemeList : Gtk.TreeView {
/////////////////////////////////////////////////////////////////////
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.
@@ -36,58 +42,50 @@ class ThemeList : Gtk.TreeView {
public ThemeList() {
GLib.Object();
- var data = new Gtk.ListStore(2, typeof(bool), // selected
- typeof(string)); // description
- base.set_model(data);
- base.set_headers_visible(false);
- base.set_rules_hint(true);
- base.set_grid_lines(Gtk.TreeViewGridLines.NONE);
+ 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();
- var check_render = new Gtk.CellRendererToggle();
- check_render.set_radio(true);
- check_render.set_activatable(true);
- main_column.pack_start(check_render, false);
-
- // switch the theme if the entry has been toggled
- check_render.toggled.connect((r, path) => {
- Gtk.TreeIter toggled;
- data.get_iter(out toggled, new Gtk.TreePath.from_string(path));
-
- if (toggled != this.active) {
- Timeout.add(10, () => {
- int index = int.parse(path);
- Config.global.theme = Config.global.themes[index];
- Config.global.theme.load();
- Config.global.theme.load_images();
- return false;
- });
-
- data.set(this.active, 0, false);
- data.set(toggled, 0, true);
-
- this.active = toggled;
- }
- });
+ 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);
- base.append_column(main_column);
+ this.append_column(main_column);
+
+ main_column.add_attribute(icon_render, "pixbuf", DataPos.ICON);
+ main_column.add_attribute(theme_render, "markup", DataPos.NAME);
- main_column.add_attribute(check_render, "active", 0);
- main_column.add_attribute(theme_render, "markup", 1);
+ 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];
+ 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, 0, theme == Config.global.theme);
- data.set(current, 1, "<b>" + theme.name + "</b>\n" + theme.description
- + " <small> - " + _("by") + " " + theme.author + "</small>");
+ data.set(current, DataPos.ICON, theme.preview_icon.to_pixbuf());
+ data.set(current, DataPos.NAME, "<b>"+theme.name+"</b><small> - "+theme.description+"\n"
+ +"<i>"+_("By")+" "+theme.author+"</i></small>");
if(theme == Config.global.theme)
- this.active = current;
+ get_selection().select_iter(current);
}
}
}
diff --git a/src/gui/tipViewer.vala b/src/gui/tipViewer.vala
deleted file mode 100644
index c653dd9..0000000
--- a/src/gui/tipViewer.vala
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Copyright (c) 2011 by Simon Schneegans
-
-This program is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the Free
-Software Foundation, either version 3 of the License, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-more details.
-
-You should have received a copy of the GNU General Public License along with
-this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-namespace GnomePie {
-
-/////////////////////////////////////////////////////////////////////////
-/// A widget showing tips. The tips are beautifully faded in and out.
-/////////////////////////////////////////////////////////////////////////
-
-public class TipViewer : Gtk.Label {
-
- /////////////////////////////////////////////////////////////////////
- /// Some settings tweaking the behavior of the TipViewer.
- /////////////////////////////////////////////////////////////////////
-
- private const double fade_time = 0.5;
- private const double frame_rate = 20.0;
- private const double delay = 7.0;
-
- /////////////////////////////////////////////////////////////////////
- /// False, if the playback of tips is stopped.
- /////////////////////////////////////////////////////////////////////
-
- private bool playing = false;
-
- /////////////////////////////////////////////////////////////////////
- /// An array containing all tips.
- /////////////////////////////////////////////////////////////////////
-
- private string[] tips;
-
- /////////////////////////////////////////////////////////////////////
- /// The index of the currently displayed tip.
- /////////////////////////////////////////////////////////////////////
-
- private int index = -1;
-
- /////////////////////////////////////////////////////////////////////
- /// Colors of the font and the background. Used for fading effects.
- /////////////////////////////////////////////////////////////////////
-
- private Gdk.Color fg;
- private Gdk.Color bg;
-
- /////////////////////////////////////////////////////////////////////
- /// The fading value.
- /////////////////////////////////////////////////////////////////////
-
- private AnimatedValue alpha;
-
- /////////////////////////////////////////////////////////////////////
- /// C'tor, initializes all members and sets the basic layout.
- /////////////////////////////////////////////////////////////////////
-
- public TipViewer(string[] tips) {
- this.tips = tips;
- this.fg = this.get_style().fg[0];
- this.bg = this.get_style().bg[0];
-
- this.alpha = new AnimatedValue.linear(1.0, 0.0, this.fade_time);
-
- this.set_alignment (0.0f, 0.5f);
- this.wrap = true;
- this.set_use_markup(true);
- this.modify_font(Pango.FontDescription.from_string("9"));
-
- this.set_random_tip();
- }
-
- /////////////////////////////////////////////////////////////////////
- /// Starts the playback of tips.
- /////////////////////////////////////////////////////////////////////
-
- public void start_slide_show() {
- if (!this.playing && tips.length > 1) {
- this.playing = true;
- GLib.Timeout.add((uint)(this.delay*1000.0), () => {
- this.fade_out();
-
- GLib.Timeout.add((uint)(1000.0*this.fade_time), () => {
- this.set_random_tip();
- this.fade_in();
- return false;
- });
-
- return this.playing;
- });
- }
- }
-
- /////////////////////////////////////////////////////////////////////
- /// Stops the playback of tips.
- /////////////////////////////////////////////////////////////////////
-
- public void stop_slide_show() {
- this.playing = false;
- }
-
- /////////////////////////////////////////////////////////////////////
- /// Starts the fading in.
- /////////////////////////////////////////////////////////////////////
-
- private void fade_in() {
- this.alpha = new AnimatedValue.linear(this.alpha.val, 1.0, this.fade_time);
-
- GLib.Timeout.add((uint)(1000.0/this.frame_rate), () => {
- this.alpha.update(1.0/this.frame_rate);
- this.update_label();
-
- return (this.alpha.val != 1.0);
- });
- }
-
- /////////////////////////////////////////////////////////////////////
- /// Starts the fading out.
- /////////////////////////////////////////////////////////////////////
-
- private void fade_out() {
- this.alpha = new AnimatedValue.linear(this.alpha.val, 0.0, this.fade_time);
-
- GLib.Timeout.add((uint)(1000.0/this.frame_rate), () => {
- this.alpha.update(1.0/this.frame_rate);
- this.update_label();
-
- return (this.alpha.val != 0.0);
- });
- }
-
- /////////////////////////////////////////////////////////////////////
- /// Updates the color of the label. Called every frame while fading.
- /////////////////////////////////////////////////////////////////////
-
- private void update_label() {
- Gdk.Color color = {(uint32)(fg.pixel*this.alpha.val + bg.pixel*(1.0 - this.alpha.val)),
- (uint16)(fg.red*this.alpha.val + bg.red*(1.0 - this.alpha.val)),
- (uint16)(fg.green*this.alpha.val + bg.green*(1.0 - this.alpha.val)),
- (uint16)(fg.blue*this.alpha.val + bg.blue*(1.0 - this.alpha.val))};
-
- this.modify_fg(Gtk.StateType.NORMAL, color);
- }
-
- /////////////////////////////////////////////////////////////////////
- /// Chooses the next random tip.
- /////////////////////////////////////////////////////////////////////
-
- private void set_random_tip() {
- if (tips.length > 1) {
- int next_index = -1;
- do {
- next_index = GLib.Random.int_range(0, tips.length);
- } while (next_index == this.index);
- this.index = next_index;
- this.label = tips[this.index];
- }
- }
-}
-
-}
diff --git a/src/gui/triggerSelectButton.vala b/src/gui/triggerSelectButton.vala
new file mode 100644
index 0000000..eeb37e2
--- /dev/null
+++ b/src/gui/triggerSelectButton.vala
@@ -0,0 +1,161 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+namespace GnomePie {
+
+/////////////////////////////////////////////////////////////////////////
+/// This window allows the selection of a hotkey. It is returned in form
+/// of a Trigger. Therefore it can be either a keyboard driven hotkey or
+/// a mouse based hotkey.
+/////////////////////////////////////////////////////////////////////////
+
+public class 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.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 < rect.x || event.x > rect.x + rect.width
+ || event.y < rect.y || event.y > rect.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;
+ }
+}
+
+}
diff --git a/src/gui/triggerSelectWindow.vala b/src/gui/triggerSelectWindow.vala
index e003a84..23eea3c 100644
--- a/src/gui/triggerSelectWindow.vala
+++ b/src/gui/triggerSelectWindow.vala
@@ -23,21 +23,23 @@ namespace GnomePie {
/// a mouse based hotkey.
/////////////////////////////////////////////////////////////////////////
-public class TriggerSelectWindow : Gtk.Dialog {
+public class TriggerSelectWindow : GLib.Object {
/////////////////////////////////////////////////////////////////////
/// This signal is emitted when the user selects a new hot key.
/////////////////////////////////////////////////////////////////////
- public signal void on_select(Trigger trigger);
+ 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.Label preview;
+ private Gtk.CheckButton centered;
+ private TriggerSelectButton button;
/////////////////////////////////////////////////////////////////////
/// The currently configured trigger.
@@ -54,204 +56,133 @@ public class TriggerSelectWindow : Gtk.Dialog {
private Trigger original_trigger = null;
/////////////////////////////////////////////////////////////////////
- /// These modifiers are ignored.
- /////////////////////////////////////////////////////////////////////
-
- private Gdk.ModifierType lock_modifiers = Gdk.ModifierType.MOD2_MASK
- |Gdk.ModifierType.LOCK_MASK
- |Gdk.ModifierType.MOD5_MASK;
-
- /////////////////////////////////////////////////////////////////////
/// C'tor, constructs a new TriggerSelectWindow.
/////////////////////////////////////////////////////////////////////
public TriggerSelectWindow() {
- this.title = _("Define an open-command");
- this.resizable = false;
- this.delete_event.connect(hide_on_delete);
- this.key_press_event.connect(on_key_press);
- this.button_press_event.connect(on_button_press);
-
- this.show.connect_after(() => {
- FocusGrabber.grab(this);
- });
+ try {
- this.hide.connect(() => {
- FocusGrabber.ungrab(this);
- });
+ Gtk.Builder builder = new Gtk.Builder();
+
+ builder.add_from_file (Paths.ui_files + "/trigger_select.ui");
- var container = new Gtk.VBox(false, 6);
- container.set_border_width(6);
-
- // click area
- var click_frame = new Gtk.Frame(_("Click here if you want to bind a mouse button!"));
+ this.window = builder.get_object("window") as Gtk.Dialog;
+ this.button = new TriggerSelectButton(true);
+ this.button.show();
- var click_box = new Gtk.EventBox();
- click_box.height_request = 100;
- click_box.button_press_event.connect(on_area_clicked);
-
- this.preview = new Gtk.Label(null);
-
- click_box.add(this.preview);
-
- click_frame.add(click_box);
-
- container.pack_start(click_frame, false);
+ 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);
+ });
- // turbo checkbox
- this.turbo = new Gtk.CheckButton.with_label (_("Turbo mode"));
- this.turbo.tooltip_text = _("If checked, the Pie will close when you " +
- "release the chosen hot key.");
- this.turbo.active = false;
- this.turbo.toggled.connect(() => {
- if (this.trigger != null)
- this.update_trigger(new Trigger.from_values(
- this.trigger.key_sym, this.trigger.modifiers,
- this.trigger.with_mouse, this.turbo.active,
- this.delayed.active));
- });
-
- container.pack_start(turbo, false);
+ (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);
- // delayed checkbox
- this.delayed = new Gtk.CheckButton.with_label (_("Long press for activation"));
- this.delayed.tooltip_text = _("If checked, the Pie will only open if you " +
- "press this hot key a bit longer.");
- this.delayed.active = false;
- this.delayed.toggled.connect(() => {
- if (this.trigger != null)
- this.update_trigger(new Trigger.from_values(
- this.trigger.key_sym, this.trigger.modifiers,
- this.trigger.with_mouse, this.turbo.active,
- this.delayed.active));
- });
+ 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);
- container.pack_start(delayed, false);
-
- container.show_all();
-
- this.vbox.pack_start(container, true, true);
-
- this.add_button(Gtk.Stock.CANCEL, 1);
- this.add_button(Gtk.Stock.OK, 0);
-
- // select a new trigger on OK, hide on CANCEL
- this.response.connect((id) => {
- if (id == 1)
- this.hide();
- else if (id == 0) {
- var assigned_id = PieManager.get_assigned_id(this.trigger);
+ } catch (GLib.Error e) {
+ error("Could not load UI: %s\n", e.message);
+ }
+ }
- if (this.trigger == this.original_trigger) {
- // nothing did change
- this.hide();
- } else if (this.trigger.key_code == this.original_trigger.key_code
- && this.trigger.modifiers == this.original_trigger.modifiers
- && this.trigger.with_mouse == this.original_trigger.with_mouse) {
- // only turbo and/or delayed mode changed, no need to check for double assignment
- this.on_select(this.trigger);
- this.hide();
- } else if (assigned_id != "") {
- // it's already assigned
- var error = _("This hotkey is already assigned to the pie \"%s\"! \n\nPlease select " +
- "another one or cancel your selection.").printf(PieManager.get_name_of(assigned_id));
- var dialog = new Gtk.MessageDialog((Gtk.Window)this.get_toplevel(),
- Gtk.DialogFlags.MODAL,
- Gtk.MessageType.ERROR,
- Gtk.ButtonsType.CANCEL,
- error);
- dialog.run();
- dialog.destroy();
- } else {
- // a unused hot key has been chosen, great!
- this.on_select(this.trigger);
- this.hide();
- }
- }
- });
+ /////////////////////////////////////////////////////////////////////
+ /// 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);
}
/////////////////////////////////////////////////////////////////////
- /// Used to set the currently selected trigger on opening.
+ /// Displays the window on the screen.
/////////////////////////////////////////////////////////////////////
- public void set_trigger(Trigger trigger) {
- this.turbo.active = trigger.turbo;
- this.delayed.active = trigger.delayed;
- this.original_trigger = trigger;
- this.update_trigger(trigger);
+ public void show() {
+ this.window.show_all();
}
/////////////////////////////////////////////////////////////////////
- /// Called when the user clicks in the click area.
+ /// Initilizes all members to match the Trigger of the Pie with the
+ /// given ID.
/////////////////////////////////////////////////////////////////////
- private bool on_area_clicked(Gdk.EventButton event) {
- Gdk.ModifierType state = event.state & ~ this.lock_modifiers;
+ public void set_pie(string id) {
+ var trigger = new Trigger.from_string(PieManager.get_accelerator_of(id));
- var new_trigger = new Trigger.from_values((int)event.button, state, true,
- this.turbo.active, this.delayed.active);
- if (new_trigger.key_code == 1) {
- var dialog = new Gtk.MessageDialog((Gtk.Window)this.get_toplevel(), Gtk.DialogFlags.MODAL,
- Gtk.MessageType.WARNING,
- Gtk.ButtonsType.YES_NO,
- _("It possible to make your system unusable if " +
- "you bind a Pie to your left mouse button. Do " +
- "you really want to do this?"));
-
- dialog.response.connect((response) => {
- if (response == Gtk.ResponseType.YES) {
- this.update_trigger(new_trigger);
- }
- });
-
- dialog.run();
- dialog.destroy();
- } else {
- this.update_trigger(new_trigger);
- }
+ this.turbo.active = trigger.turbo;
+ this.delayed.active = trigger.delayed;
+ this.centered.active = trigger.centered;
+ this.original_trigger = trigger;
+ this.trigger = trigger;
- return true;
+ this.button.set_trigger(trigger);
}
/////////////////////////////////////////////////////////////////////
- /// Called when the user presses a keyboard key.
+ /// Called when one of the three checkoxes is toggled.
/////////////////////////////////////////////////////////////////////
- private bool on_key_press(Gdk.EventKey event) {
- if (Gdk.keyval_name(event.keyval) == "Escape") {
- this.hide();
- } else if (Gdk.keyval_name(event.keyval) == "BackSpace") {
- this.update_trigger(new Trigger());
- } else if (event.is_modifier == 0) {
- Gdk.ModifierType state = event.state & ~ this.lock_modifiers;
- this.update_trigger(new Trigger.from_values((int)event.keyval, state, false,
- this.turbo.active, this.delayed.active));
- }
-
- return true;
+ 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 user presses a mouse button.
+ /// Called when the OK-button is pressed.
/////////////////////////////////////////////////////////////////////
- private bool on_button_press(Gdk.EventButton event) {
- int width = 0, height = 0;
- this.window.get_geometry(null, null, out width, out height, null);
- if (event.x < 0 || event.x > width || event.y < 0 || event.y > height)
- this.hide();
- return true;
+ 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();
+ }
}
/////////////////////////////////////////////////////////////////////
- /// Helper method to update the content of the trigger preview label.
+ /// Called when the cancel button is pressed.
/////////////////////////////////////////////////////////////////////
- private void update_trigger(Trigger new_trigger) {
- this.trigger = new_trigger;
- this.preview.set_markup("<big><b>" + this.trigger.label + "</b></big>");
- }
+ private void on_cancel_button_clicked() {
+ this.window.hide();
+ }
}
}
diff --git a/src/images/icon.vala b/src/images/icon.vala
index 1c8a9f4..81eb2d9 100644
--- a/src/images/icon.vala
+++ b/src/images/icon.vala
@@ -80,7 +80,17 @@ public class Icon : Image {
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 = "application-default-icon";
+ }
+
+
var icon_theme = Gtk.IconTheme.get_default();
var file = icon_theme.lookup_icon(icon_name, size, 0);
if (file != null) result = file.get_filename();
diff --git a/src/images/image.vala b/src/images/image.vala
index 836e4e2..1d9674b 100644
--- a/src/images/image.vala
+++ b/src/images/image.vala
@@ -65,14 +65,39 @@ public class Image : GLib.Object {
/////////////////////////////////////////////////////////////////////
public Image.from_pixbuf(Gdk.Pixbuf pixbuf) {
- this.load_pixbuf(pixbuf);
+ if (pixbuf != null) this.load_pixbuf(pixbuf);
+ else this.surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, 1, 1);
}
- public Image.capture_screen(int posx, int posy, int width, int height) {
+ /////////////////////////////////////////////////////////////////////
+ /// 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();
- Gdk.Pixbuf pixbuf = Gdk.pixbuf_get_from_drawable(null, root, null, posx, posy, 0, 0, width, height);
+ #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);
+ }
+ }
+ }
}
/////////////////////////////////////////////////////////////////////
@@ -87,6 +112,7 @@ public class Image : GLib.Object {
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);
@@ -106,6 +132,7 @@ public class Image : GLib.Object {
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);
@@ -130,17 +157,39 @@ public class Image : GLib.Object {
/////////////////////////////////////////////////////////////////////
public void paint_on(Cairo.Context ctx, double alpha = 1.0) {
- ctx.set_source_surface(this.surface, -0.5*this.width()-1, -0.5*this.height()-1);
+ 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<width()*height()*4-4; i+=4) {
+ var tmp = *(p + i);
+ *(p + i) = *(p + i + 2);
+ *(p + i + 2) = tmp;
+ }
+
+ return pixbuf;
+ }
+
+ /////////////////////////////////////////////////////////////////////
/// Returns a Cairo.Context for the Image.
/////////////////////////////////////////////////////////////////////
public Cairo.Context context() {
- return new Cairo.Context(this.surface);;
+ return new Cairo.Context(this.surface);
}
/////////////////////////////////////////////////////////////////////
@@ -148,7 +197,9 @@ public class Image : GLib.Object {
/////////////////////////////////////////////////////////////////////
public int width() {
- return this.surface.get_width();
+ if (this.surface != null)
+ return this.surface.get_width();
+ return 0;
}
/////////////////////////////////////////////////////////////////////
@@ -156,7 +207,9 @@ public class Image : GLib.Object {
/////////////////////////////////////////////////////////////////////
public int height() {
- return this.surface.get_height();
+ if (this.surface != null)
+ return this.surface.get_height();
+ return 0;
}
}
diff --git a/src/images/renderedText.vala b/src/images/renderedText.vala
index 924742a..e4bb4cb 100644
--- a/src/images/renderedText.vala
+++ b/src/images/renderedText.vala
@@ -55,12 +55,36 @@ public class RenderedText : Image {
/// C'tor, creates a new image representation of a string.
/////////////////////////////////////////////////////////////////////
- public RenderedText(string text, int width, int height, string font) {
- var cached = this.cache.get("%s@%ux%u:%s".printf(text, width, height, font));
+ public RenderedText(string text, int width, int height, string font,
+ Color color, double scale) {
+
+ var cached = this.cache.get("%s@%ux%u@%f:%s:%f:%f:%f:%f".printf(text, width, height, scale, font,
+ color.r, color.g, color.b, color.a));
if (cached == null) {
- this.render_text(text, width, height, font);
- this.cache.set("%s@%ux%u:%s".printf(text, width, height, font), this.surface);
+ this.render_text(text, width, height, font, color, scale);
+ this.cache.set("%s@%ux%u@%f:%s:%f:%f:%f:%f".printf(text, width, height, scale, font,
+ color.r, color.g, color.b, color.a), this.surface);
+ } else {
+ this.surface = cached;
+ }
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// 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) {
+
+ var cached = this.cache.get("%s@%ux%u@%f:%s:%f:%f:%f:%f".printf(text, width, height, scale, font,
+ color.r, color.g, color.b, color.a));
+
+ if (cached == null) {
+ this.render_markup(text, width, height, font, color, scale);
+ this.cache.set("%s@%ux%u@%f:%s:%f:%f:%f:%f".printf(text, width, height, scale, font,
+ color.r, color.g, color.b, color.a), this.surface);
} else {
this.surface = cached;
}
@@ -70,20 +94,21 @@ public class RenderedText : Image {
/// Creates a new transparent image, with text written onto.
/////////////////////////////////////////////////////////////////////
- public void render_text(string text, int width, int height, string font) {
+ 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);
var ctx = this.context();
- // set the color as specified in the current theme
- Color color = Config.global.theme.caption_color;
+ // 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() * Config.global.global_scale));
+ font_description.set_size((int)(font_description.get_size() * scale));
layout.set_font_description(font_description);
layout.set_text(text, -1);
@@ -105,6 +130,40 @@ public class RenderedText : Image {
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);
+ }
}
}
diff --git a/src/images/themedIcon.vala b/src/images/themedIcon.vala
index 29ae380..6c904a6 100644
--- a/src/images/themedIcon.vala
+++ b/src/images/themedIcon.vala
@@ -76,7 +76,7 @@ public class ThemedIcon : Image {
var layers = active ? Config.global.theme.active_slice_layers : Config.global.theme.inactive_slice_layers;
// get max size
- int size = 0;
+ int size = 1;
foreach (var layer in layers) {
if (layer.image.width() > size) size = layer.image.width();
}
diff --git a/src/pies/load.vala b/src/pies/load.vala
index 98fd72f..b606cf5 100644
--- a/src/pies/load.vala
+++ b/src/pies/load.vala
@@ -80,7 +80,7 @@ namespace Pies {
string name = "";
string icon = "";
string id = "";
- int quick_action = -1;
+ int quickaction = -1;
// parse all attributes of this node
for (Xml.Attr* attribute = node->properties; attribute != null; attribute = attribute->next) {
@@ -92,7 +92,7 @@ namespace Pies {
hotkey = attr_content;
break;
case "quickaction":
- quick_action = int.parse(attr_content);
+ quickaction = int.parse(attr_content);
break;
case "name":
name = attr_content;
@@ -145,7 +145,7 @@ namespace Pies {
string icon="";
string command="";
string type="";
- bool quick_action = false;
+ bool quickaction = false;
// parse all attributes of this node
for (Xml.Attr* attribute = slice->properties; attribute != null; attribute = attribute->next) {
@@ -166,7 +166,7 @@ namespace Pies {
type = attr_content;
break;
case "quickaction":
- quick_action = bool.parse(attr_content);
+ quickaction = bool.parse(attr_content);
break;
default:
warning("Invalid attribute \"" + attr_name + "\" in <slice> element in pies.conf!");
@@ -174,19 +174,8 @@ namespace Pies {
}
}
- Action action = null;
-
// create a new Action according to the loaded type
- foreach (var action_type in ActionRegistry.types) {
- if (ActionRegistry.settings_names[action_type] == type) {
-
- action = GLib.Object.new(action_type, "name", name,
- "icon", icon,
- "real_command", command,
- "is_quick_action", quick_action) as Action;
- break;
- }
- }
+ Action action = ActionRegistry.create_action(type, name, icon, command, quickaction);
if (action != null) pie.add_action(action);
}
@@ -213,15 +202,7 @@ namespace Pies {
}
}
- ActionGroup group = null;
-
- // create a new ActionGroup according to the loaded type
- foreach (var group_type in GroupRegistry.types) {
- if (GroupRegistry.settings_names[group_type] == type) {
- group = GLib.Object.new(group_type, "parent_id", pie.id) as ActionGroup;
- break;
- }
- }
+ ActionGroup group = GroupRegistry.create_group(type, pie.id);
if (group != null) pie.add_group(group);
}
diff --git a/src/pies/pie.vala b/src/pies/pie.vala
index 0f87d8f..fa205c7 100644
--- a/src/pies/pie.vala
+++ b/src/pies/pie.vala
@@ -29,14 +29,14 @@ public class Pie : GLib.Object {
/// The name of this Pie. It has not to be unique.
/////////////////////////////////////////////////////////////////////
- public string name { get; construct; }
+ 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; construct; }
+ public string icon { get; set; }
/////////////////////////////////////////////////////////////////////
/// The ID of this Pie. It has to be unique among all Pies. This ID
@@ -77,18 +77,44 @@ public class Pie : GLib.Object {
/// Adds an Action to this Pie.
/////////////////////////////////////////////////////////////////////
- public void add_action(Action action) {
+ public void add_action(Action action, int at_position = -1) {
var group = new ActionGroup(this.id);
group.add_action(action);
- this.add_group(group);
+ this.add_group(group, at_position);
}
/////////////////////////////////////////////////////////////////////
/// Adds an ActionGroup to this Pie.
/////////////////////////////////////////////////////////////////////
- public void add_group(ActionGroup group) {
- this.action_groups.add(group);
+ 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);
}
}
diff --git a/src/pies/pieManager.vala b/src/pies/pieManager.vala
index 5f84ea0..0263d23 100644
--- a/src/pies/pieManager.vala
+++ b/src/pies/pieManager.vala
@@ -32,6 +32,13 @@ public class PieManager : GLib.Object {
public static Gee.HashMap<string, Pie?> all_pies { get; private set; }
/////////////////////////////////////////////////////////////////////
+ /// Stores all PieWindows which are currently opened. Should be
+ /// rarely more than two...
+ /////////////////////////////////////////////////////////////////////
+
+ public static Gee.HashSet<PieWindow?> opened_windows { get; private set; }
+
+ /////////////////////////////////////////////////////////////////////
/// Stores all global hotkeys.
/////////////////////////////////////////////////////////////////////
@@ -42,7 +49,7 @@ public class PieManager : GLib.Object {
/// will be false already.
/////////////////////////////////////////////////////////////////////
- private static bool a_pie_is_opened = false;
+ private static bool a_pie_is_active = false;
/////////////////////////////////////////////////////////////////////
/// Initializes all Pies. They are loaded from the pies.conf file.
@@ -50,6 +57,7 @@ public class PieManager : GLib.Object {
public static void init() {
all_pies = new Gee.HashMap<string, Pie?>();
+ opened_windows = new Gee.HashSet<PieWindow?>();
bindings = new BindingManager();
// load all Pies from th pies.conf file
@@ -66,19 +74,27 @@ public class PieManager : GLib.Object {
/////////////////////////////////////////////////////////////////////
public static void open_pie(string id) {
- if (!a_pie_is_opened) {
+ if (!a_pie_is_active) {
Pie? pie = all_pies[id];
if (pie != null) {
- a_pie_is_opened = true;
+ a_pie_is_active = true;
var window = new PieWindow();
window.load_pie(pie);
window.open();
+ opened_windows.add(window);
+
+ window.on_closed.connect(() => {
+ opened_windows.remove(window);
+ });
+
window.on_closing.connect(() => {
- a_pie_is_opened = false;
+ a_pie_is_active = false;
});
+
+
} else {
warning("Failed to open pie with ID \"" + id + "\": ID does not exist!");
}
@@ -103,6 +119,15 @@ public class PieManager : GLib.Object {
}
/////////////////////////////////////////////////////////////////////
+ /// 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.
/////////////////////////////////////////////////////////////////////
@@ -111,6 +136,15 @@ public class PieManager : GLib.Object {
}
/////////////////////////////////////////////////////////////////////
+ /// 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.
/////////////////////////////////////////////////////////////////////
@@ -212,7 +246,11 @@ public class PieManager : GLib.Object {
}
}
- private static void create_launcher(string id) {
+ /////////////////////////////////////////////////////////////////////
+ /// 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];
@@ -220,7 +258,7 @@ public class PieManager : GLib.Object {
"#!/usr/bin/env xdg-open\n" +
"[Desktop Entry]\n" +
"Name=%s\n".printf(pie.name) +
- "Exec=gnome-pie -o %s\n".printf(pie.id) +
+ "Exec=%s -o %s\n".printf(Paths.executable, pie.id) +
"Encoding=UTF-8\n" +
"Type=Application\n" +
"Icon=%s\n".printf(pie.icon);
@@ -237,6 +275,10 @@ public class PieManager : GLib.Object {
}
}
+ /////////////////////////////////////////////////////////////////////
+ /// 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)) {
diff --git a/src/pies/save.vala b/src/pies/save.vala
index d691a95..c940e5a 100644
--- a/src/pies/save.vala
+++ b/src/pies/save.vala
@@ -55,18 +55,18 @@ namespace Pies {
if (group.get_type().depth() == 2) {
foreach (var action in group.actions) {
writer.start_element("slice");
- writer.write_attribute("type", ActionRegistry.settings_names[action.get_type()]);
- if (ActionRegistry.icon_name_editables[action.get_type()]) {
+ 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_quick_action ? "true" : "false");
+ writer.write_attribute("quickAction", action.is_quickaction ? "true" : "false");
writer.end_element();
}
} else {
writer.start_element("group");
- writer.write_attribute("type", GroupRegistry.settings_names[group.get_type()]);
+ writer.write_attribute("type", GroupRegistry.descriptions[group.get_type().name()].id);
writer.end_element();
}
}
diff --git a/src/renderers/pieRenderer.vala b/src/renderers/pieRenderer.vala
index ffaf776..67a6b56 100644
--- a/src/renderers/pieRenderer.vala
+++ b/src/renderers/pieRenderer.vala
@@ -31,7 +31,7 @@ public class PieRenderer : GLib.Object {
/// gets executed when the user clicks on the middle of the pie)
/////////////////////////////////////////////////////////////////////
- public int quick_action { get; private set; }
+ public int quickaction { get; private set; }
/////////////////////////////////////////////////////////////////////
/// The index of the currently active slice.
@@ -83,13 +83,13 @@ public class PieRenderer : GLib.Object {
public PieRenderer() {
this.slices = new Gee.ArrayList<SliceRenderer?>();
this.center = new CenterRenderer(this);
- this.quick_action = -1;
+ this.quickaction = -1;
this.active_slice = -2;
this.size = 0;
}
/////////////////////////////////////////////////////////////////////
- /// Loads an Pie. All members are initialized accordingly.
+ /// Loads a Pie. All members are initialized accordingly.
/////////////////////////////////////////////////////////////////////
public void load_pie(Pie pie) {
@@ -102,8 +102,8 @@ public class PieRenderer : GLib.Object {
this.slices.add(renderer);
renderer.load(action, slices.size-1);
- if (action.is_quick_action) {
- this.quick_action = count;
+ if (action.is_quickaction) {
+ this.quickaction = count;
}
++count;
@@ -112,7 +112,7 @@ public class PieRenderer : GLib.Object {
this.turbo_mode = PieManager.get_is_turbo(pie.id);
- this.set_highlighted_slice(this.quick_action);
+ 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);
@@ -227,39 +227,41 @@ public class PieRenderer : GLib.Object {
/////////////////////////////////////////////////////////////////////
public void draw(double frame_time, Cairo.Context ctx, int mouse_x, int mouse_y) {
- double distance = sqrt(mouse_x*mouse_x + mouse_y*mouse_y);
- double angle = 0.0;
+ 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;
- }
+ if (this.key_board_control) {
+ angle = 2.0*PI*this.active_slice/(double)slice_count();
+ } else {
- int next_active_slice = this.active_slice;
+ 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;
+ }
- if (distance < Config.global.theme.active_radius
- && this.quick_action >= 0 && this.quick_action < this.slices.size) {
-
- next_active_slice = this.quick_action;
- angle = 2.0*PI*quick_action/(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);
}
-
- 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);
+ center.draw(frame_time, ctx, angle, distance);
+
+ foreach (var slice in this.slices)
+ slice.draw(frame_time, ctx, angle, distance);
+ }
}
/////////////////////////////////////////////////////////////////////
@@ -278,8 +280,8 @@ public class PieRenderer : GLib.Object {
if (index != this.active_slice) {
if (index >= 0 && index < this.slice_count())
this.active_slice = index;
- else if (this.quick_action >= 0)
- this.active_slice = this.quick_action;
+ else if (this.quickaction >= 0)
+ this.active_slice = this.quickaction;
else
this.active_slice = -1;
diff --git a/src/renderers/pieWindow.vala b/src/renderers/pieWindow.vala
index 59117df..0a26110 100644
--- a/src/renderers/pieWindow.vala
+++ b/src/renderers/pieWindow.vala
@@ -32,6 +32,19 @@ public class PieWindow : Gtk.Window {
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.
/////////////////////////////////////////////////////////////////////
@@ -56,13 +69,6 @@ public class PieWindow : Gtk.Window {
private bool has_compositing = false;
/////////////////////////////////////////////////////////////////////
- /// The background image used for fake transparency if
- /// has_compositing is false.
- /////////////////////////////////////////////////////////////////////
-
- private Image background = null;
-
- /////////////////////////////////////////////////////////////////////
/// C'tor, sets up the window.
/////////////////////////////////////////////////////////////////////
@@ -73,7 +79,7 @@ public class PieWindow : Gtk.Window {
this.set_skip_taskbar_hint(true);
this.set_skip_pager_hint(true);
this.set_keep_above(true);
- this.set_type_hint(Gdk.WindowTypeHint.SPLASHSCREEN);
+ this.set_type_hint(Gdk.WindowTypeHint.UTILITY);
this.set_decorated(false);
this.set_resizable(false);
this.icon_name = "gnome-pie";
@@ -81,7 +87,11 @@ public class PieWindow : Gtk.Window {
// check for compositing
if (this.screen.is_composited()) {
- this.set_colormap(this.screen.get_rgba_colormap());
+ #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;
}
@@ -128,9 +138,18 @@ public class PieWindow : Gtk.Window {
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
- this.expose_event.connect(this.draw);
+ #if HAVE_GTK_3
+ this.draw.connect(this.draw_window);
+ #else
+ this.expose_event.connect(this.draw_window);
+ #endif
}
/////////////////////////////////////////////////////////////////////
@@ -139,7 +158,7 @@ public class PieWindow : Gtk.Window {
public void load_pie(Pie pie) {
this.renderer.load_pie(pie);
- this.set_window_position();
+ this.set_window_position(pie);
this.set_size_request(renderer.size, renderer.size);
}
@@ -160,7 +179,6 @@ public class PieWindow : Gtk.Window {
// capture the input focus
this.show();
- FocusGrabber.grab(this);
// start the timer
this.timer = new GLib.Timer();
@@ -178,10 +196,13 @@ public class PieWindow : Gtk.Window {
/// Draw the Pie.
/////////////////////////////////////////////////////////////////////
- private bool draw(Gtk.Widget da, Gdk.EventExpose event) {
- // clear the window
- var ctx = Gdk.cairo_create(this.window);
-
+ #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);
@@ -219,12 +240,13 @@ public class PieWindow : Gtk.Window {
if (!this.closing) {
this.closing = true;
this.on_closing();
- FocusGrabber.ungrab(this);
+ Gtk.grab_remove(this);
+ FocusGrabber.ungrab();
this.renderer.activate();
Timeout.add((uint)(Config.global.theme.fade_out_time*1000), () => {
+ this.on_closed();
this.destroy();
- ThemedIcon.clear_cache();
return false;
});
}
@@ -238,12 +260,13 @@ public class PieWindow : Gtk.Window {
if (!this.closing) {
this.closing = true;
this.on_closing();
- FocusGrabber.ungrab(this);
+ Gtk.grab_remove(this);
+ FocusGrabber.ungrab();
this.renderer.cancel();
Timeout.add((uint)(Config.global.theme.fade_out_time*1000), () => {
+ this.on_closed();
this.destroy();
- ThemedIcon.clear_cache();
return false;
});
}
@@ -254,9 +277,9 @@ public class PieWindow : Gtk.Window {
/// the mouse.
/////////////////////////////////////////////////////////////////////
- private void set_window_position() {
- if(Config.global.open_at_mouse) this.set_position(Gtk.WindowPosition.MOUSE);
- else this.set_position(Gtk.WindowPosition.CENTER);
+ 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);
}
/////////////////////////////////////////////////////////////////////
diff --git a/src/renderers/sliceRenderer.vala b/src/renderers/sliceRenderer.vala
index 61c50b1..4803070 100644
--- a/src/renderers/sliceRenderer.vala
+++ b/src/renderers/sliceRenderer.vala
@@ -20,7 +20,7 @@ using GLib.Math;
namespace GnomePie {
/////////////////////////////////////////////////////////////////////////
-/// Renders a Slice of a Pie. According to the current theme.
+/// Renders a Slice of a Pie. According to the current theme.
/////////////////////////////////////////////////////////////////////////
public class SliceRenderer : GLib.Object {
@@ -123,7 +123,9 @@ public class SliceRenderer : GLib.Object {
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_font,
+ Config.global.theme.caption_color,
+ Config.global.global_scale);
this.active_icon = new ThemedIcon(action.icon, true);
this.inactive_icon = new ThemedIcon(action.icon, false);
@@ -138,7 +140,8 @@ public class SliceRenderer : GLib.Object {
}
this.hotkey = new RenderedText(hotkey_label, (int)Config.global.theme.slice_radius*2,
- (int)Config.global.theme.slice_radius*2, "sans 20");
+ (int)Config.global.theme.slice_radius*2, "sans 20",
+ Config.global.theme.caption_color, Config.global.global_scale);
}
/////////////////////////////////////////////////////////////////////
@@ -185,6 +188,13 @@ public class SliceRenderer : GLib.Object {
/////////////////////////////////////////////////////////////////////
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);
double direction = 2.0 * PI * position/parent.slice_count() + this.fade_rotation.val;
double max_scale = 1.0/Config.global.theme.max_zoom;
@@ -205,13 +215,6 @@ public class SliceRenderer : GLib.Object {
if (fabs(this.scale.end - max_scale) > Config.global.theme.max_zoom*0.005)
this.scale.reset_target(max_scale, Config.global.theme.transition_time);
- // update the AnimatedValues
- this.scale.update(frame_time);
- this.alpha.update(frame_time);
- this.fade.update(frame_time);
- this.fade_scale.update(frame_time);
- this.fade_rotation.update(frame_time);
-
ctx.save();
// distance from the center
diff --git a/src/themes/theme.vala b/src/themes/theme.vala
index 284e1ef..269a574 100644
--- a/src/themes/theme.vala
+++ b/src/themes/theme.vala
@@ -55,6 +55,7 @@ public class Theme : GLib.Object {
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<CenterLayer?> center_layers {get; private set;}
public Gee.ArrayList<SliceLayer?> active_slice_layers {get; private set;}
@@ -82,6 +83,8 @@ public class Theme : GLib.Object {
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";
diff --git a/src/utilities/animatedValue.vala b/src/utilities/animatedValue.vala
index 32ab889..7acc7a7 100644
--- a/src/utilities/animatedValue.vala
+++ b/src/utilities/animatedValue.vala
@@ -116,10 +116,16 @@ public class AnimatedValue : GLib.Object {
/////////////////////////////////////////////////////////////////////
public void reset_target(double end, double duration) {
- this.start = this.val;
this.end = end;
this.duration = duration;
- this.state = 0.0;
+ this.start = this.val;
+
+ if (duration == 0.0) {
+ this.val = end;
+ this.state = 1.0;
+ } else {
+ this.state = 0.0;
+ }
}
/////////////////////////////////////////////////////////////////////
@@ -129,7 +135,7 @@ public class AnimatedValue : GLib.Object {
public void update(double time) {
this.state += time/this.duration;
- if (state < 1) {
+ if (this.state < 1) {
switch (this.type) {
case Type.LINEAR:
@@ -152,6 +158,7 @@ public class AnimatedValue : GLib.Object {
}
break;
}
+
} else if (this.val != this.end) {
this.val = this.end;
}
diff --git a/src/utilities/bindingManager.vala b/src/utilities/bindingManager.vala
index 437f4c1..5a4548e 100644
--- a/src/utilities/bindingManager.vala
+++ b/src/utilities/bindingManager.vala
@@ -54,6 +54,12 @@ public class BindingManager : GLib.Object {
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;
@@ -91,9 +97,8 @@ public class BindingManager : GLib.Object {
public void bind(Trigger trigger, string id) {
if(trigger.key_code != 0) {
- Gdk.Window rootwin = Gdk.get_default_root_window();
- X.Display display = Gdk.x11_drawable_get_xdisplay(rootwin);
- X.ID xid = Gdk.x11_drawable_get_xid(rootwin);
+ X.Display display = Gdk.x11_get_default_xdisplay();
+ X.ID xid = Gdk.x11_get_default_root_xwindow();
Gdk.error_trap_push();
@@ -121,9 +126,9 @@ public class BindingManager : GLib.Object {
/////////////////////////////////////////////////////////////////////
public void unbind(string id) {
- Gdk.Window rootwin = Gdk.get_default_root_window();
- X.Display display = Gdk.x11_drawable_get_xdisplay(rootwin);
- X.ID xid = Gdk.x11_drawable_get_xid(rootwin);
+ X.Display display = Gdk.x11_get_default_xdisplay();
+ X.ID xid = Gdk.x11_get_default_root_xwindow();
+
Gee.List<Keybinding> remove_bindings = new Gee.ArrayList<Keybinding>();
foreach(var binding in bindings) {
if(id == binding.id) {
@@ -185,6 +190,20 @@ public class BindingManager : GLib.Object {
}
/////////////////////////////////////////////////////////////////////
+ /// 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.
/////////////////////////////////////////////////////////////////////
@@ -258,8 +277,7 @@ public class BindingManager : GLib.Object {
// if the trigger is released and an event is currently waiting
// simulate that the trigger has been pressed without any inter-
// ference of Gnome-Pie
- Gdk.Window rootwin = Gdk.get_default_root_window();
- X.Display display = Gdk.x11_drawable_get_xdisplay(rootwin);
+ X.Display display = Gdk.x11_get_default_xdisplay();
// unbind the trigger, else we'll capture that event again ;)
unbind(delayed_binding.id);
diff --git a/src/utilities/config.vala b/src/utilities/config.vala
index cf4311d..5790eef 100644
--- a/src/utilities/config.vala
+++ b/src/utilities/config.vala
@@ -55,7 +55,6 @@ public class Config : GLib.Object {
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 open_at_mouse { get; set; default = true; }
public bool auto_start { get; set; default = false; }
public Gee.ArrayList<Theme?> themes { get; private set; }
@@ -71,7 +70,6 @@ public class Config : GLib.Object {
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("open_at_mouse", open_at_mouse ? "true" : "false");
writer.end_element();
writer.end_document();
}
@@ -114,9 +112,6 @@ public class Config : GLib.Object {
case "show_indicator":
show_indicator = bool.parse(attr_content);
break;
- case "open_at_mouse":
- open_at_mouse = bool.parse(attr_content);
- break;
default:
warning("Invalid setting \"" + attr_name + "\" in gnome-pie.conf!");
break;
diff --git a/src/utilities/focusGrabber.vala b/src/utilities/focusGrabber.vala
index 0e07b39..293e103 100644
--- a/src/utilities/focusGrabber.vala
+++ b/src/utilities/focusGrabber.vala
@@ -25,48 +25,95 @@ public class FocusGrabber : GLib.Object {
/////////////////////////////////////////////////////////////////////
/// Utilities for grabbing focus.
- /// Code from Gnome-Do/Synapse.
+ /// Code roughly from Gnome-Do/Synapse.
/////////////////////////////////////////////////////////////////////
- public static void grab(Gtk.Window window) {
- window.present_with_time(Gdk.CURRENT_TIME);
- window.get_window().raise();
- window.get_window().focus(Gdk.CURRENT_TIME);
+ 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);
- int i = 0;
- Timeout.add(100, () => {
- if (++i >= 100) return false;
- return !try_grab_window(window);
- });
+ 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 from Gnome-Do/Synapse.
+ /// Code roughly from Gnome-Do/Synapse.
/////////////////////////////////////////////////////////////////////
- public static void ungrab(Gtk.Window window) {
- Gdk.pointer_ungrab(Gdk.CURRENT_TIME);
- Gdk.keyboard_ungrab(Gdk.CURRENT_TIME);
- Gtk.grab_remove(window);
+ 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();
+
+ unowned GLib.List<weak Gdk.Device?> list = manager.list_devices(Gdk.DeviceType.MASTER);
+ 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 from Gnome-Do/Synapse.
+ /// Code roughly from Gnome-Do/Synapse.
/////////////////////////////////////////////////////////////////////
- private static bool try_grab_window(Gtk.Window window) {
- if (Gdk.pointer_grab(window.get_window(), true, Gdk.EventMask.BUTTON_PRESS_MASK |
- Gdk.EventMask.BUTTON_RELEASE_MASK | Gdk.EventMask.POINTER_MOTION_MASK,
- null, null, Gdk.CURRENT_TIME) == Gdk.GrabStatus.SUCCESS) {
+ 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();
- if (Gdk.keyboard_grab(window.get_window(), true, Gdk.CURRENT_TIME) == Gdk.GrabStatus.SUCCESS) {
- Gtk.grab_add(window);
+ bool grabbed_all = true;
+
+ unowned GLib.List<weak Gdk.Device?> list = manager.list_devices(Gdk.DeviceType.MASTER);
+ 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;
- } else {
- Gdk.pointer_ungrab(Gdk.CURRENT_TIME);
- return false;
+
+ 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;
}
}
diff --git a/src/utilities/key.vala b/src/utilities/key.vala
index 6700b16..5f27a1e 100644
--- a/src/utilities/key.vala
+++ b/src/utilities/key.vala
@@ -55,10 +55,21 @@ public class Key : GLib.Object {
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(string stroke) {
+ public Key.from_string(string stroke) {
this.accelerator = stroke;
uint keysym;
@@ -68,6 +79,17 @@ public class Key : GLib.Object {
}
/////////////////////////////////////////////////////////////////////
+ /// 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.
/////////////////////////////////////////////////////////////////////
@@ -113,7 +135,7 @@ public class Key : GLib.Object {
private Gdk.ModifierType get_modifiers() {
Gdk.ModifierType modifiers;
- Gdk.Display.get_default().get_pointer(null, null, null, out modifiers);
+ Gtk.get_current_event_state(out modifiers);
return modifiers;
}
diff --git a/src/utilities/paths.vala b/src/utilities/paths.vala
index 1c42176..589cc36 100644
--- a/src/utilities/paths.vala
+++ b/src/utilities/paths.vala
@@ -60,6 +60,13 @@ public class Paths : GLib.Object {
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.
/////////////////////////////////////////////////////////////////////
@@ -74,43 +81,47 @@ public class Paths : GLib.Object {
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() {
- // append resources to icon search path to icon theme, if neccasary
+ // get path of executable
try {
- var icon_dir = GLib.File.new_for_path(GLib.Path.get_dirname(
- GLib.FileUtils.read_link("/proc/self/exe"))).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/");
-
+ 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()) {
- try {
- default_dir = GLib.File.new_for_path(GLib.Path.get_dirname(
- GLib.FileUtils.read_link("/proc/self/exe"))).get_child("resources");
- } catch (GLib.FileError e) {
- warning("Failed to get path of executable!");
- }
+ 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");
@@ -121,22 +132,12 @@ public class Paths : GLib.Object {
if(locale_dir.query_exists()) {
locale_dir = GLib.File.new_for_path("/usr/local/share/locale");
} else {
-
- try {
- locale_dir = GLib.File.new_for_path(GLib.Path.get_dirname(
- GLib.FileUtils.read_link("/proc/self/exe"))).get_child(
- "resources/locale/de/LC_MESSAGES/gnomepie.mo");
- } catch (GLib.FileError e) {
- warning("Failed to get path of executable!");
- }
+ 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()) {
- try {
- locale_dir = GLib.File.new_for_path(GLib.Path.get_dirname(
- GLib.FileUtils.read_link("/proc/self/exe"))).get_child("resources/locale");
- } catch (GLib.FileError e) {
- warning("Failed to get path of executable!");
- }
+ locale_dir = GLib.File.new_for_path(GLib.Path.get_dirname(
+ executable)).get_child("resources/locale");
}
}
}
@@ -204,7 +205,10 @@ public class Paths : GLib.Object {
warning("Failed to find launchers directory!");
if (!GLib.File.new_for_path(global_themes).query_exists())
- warning("Failed to find global themes directory!");
+ warning("Failed to find global themes directory!");
+
+ if (!GLib.File.new_for_path(ui_files).query_exists())
+ warning("Failed to find UI files directory!");
}
}
diff --git a/src/utilities/trigger.vala b/src/utilities/trigger.vala
index 1f6fcfe..4b6167b 100644
--- a/src/utilities/trigger.vala
+++ b/src/utilities/trigger.vala
@@ -81,6 +81,12 @@ public class Trigger : GLib.Object {
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.
/////////////////////////////////////////////////////////////////////
@@ -93,7 +99,7 @@ public class Trigger : GLib.Object {
/// in this format: "[option(s)]<modifier(s)>button" where
/// "<modifier>" is something like "<Alt>" or "<Control>", "button"
/// something like "s", "F4" or "button0" and "[option]" is either
- /// "[turbo]" or "["delayed"]".
+ /// "[turbo]", "[centered]" or "["delayed"]".
/////////////////////////////////////////////////////////////////////
public Trigger.from_string(string trigger) {
@@ -105,9 +111,12 @@ public class Trigger : GLib.Object {
/////////////////////////////////////////////////////////////////////
public Trigger.from_values(uint key_sym, Gdk.ModifierType modifiers,
- bool with_mouse, bool turbo, bool delayed ) {
+ bool with_mouse, bool turbo, bool delayed,
+ bool centered ) {
- string trigger = (turbo ? "[turbo]" : "") + (delayed ? "[delayed]" : "");
+ string trigger = (turbo ? "[turbo]" : "")
+ + (delayed ? "[delayed]" : "")
+ + (centered ? "[centered]" : "");
if (with_mouse) {
trigger += Gtk.accelerator_name(0, modifiers) + "button%u".printf(key_sym);
@@ -123,7 +132,7 @@ public class Trigger : GLib.Object {
/// in this format: "[option(s)]<modifier(s)>button" where
/// "<modifier>" is something like "<Alt>" or "<Control>", "button"
/// something like "s", "F4" or "button0" and "[option]" is either
- /// "[turbo]" or "["delayed"]".
+ /// "[turbo]", "[centered]" or "["delayed"]".
/////////////////////////////////////////////////////////////////////
public void parse_string(string trigger) {
@@ -135,10 +144,12 @@ public class Trigger : GLib.Object {
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) {
@@ -177,12 +188,20 @@ public class Trigger : GLib.Object {
this.label_with_specials = this.label;
- if (this.turbo && this.delayed)
- this.label_with_specials += ("\n<small><span weight='light'>" + _("Turbo") + " | " + _("Delayed") + "</span></small>");
+ if (this.turbo && this.delayed && this.centered)
+ this.label_with_specials += (" <small><span weight='light'>[ " + _("Turbo") + " | " + _("Delayed") + " | " + _("Centered") + " ]</span></small>");
+ else if (this.turbo && this.centered)
+ this.label_with_specials += (" <small><span weight='light'>[ " + _("Turbo") + " | " + _("Centered") + " ]</span></small>");
+ else if (this.turbo && this.delayed)
+ this.label_with_specials += (" <small><span weight='light'>[ " + _("Turbo") + " | " + _("Delayed") + " ]</span></small>");
+ else if (this.centered && this.delayed)
+ this.label_with_specials += (" <small><span weight='light'>[ " + _("Delayed") + " | " + _("Centered") + " ]</span></small>");
else if (this.turbo)
- this.label_with_specials += ("\n<small><span weight='light'>" + _("Turbo") + "</span></small>");
+ this.label_with_specials += (" <small><span weight='light'>[ " + _("Turbo") + " ]</span></small>");
else if (this.delayed)
- this.label_with_specials += ("\n<small><span weight='light'>" + _("Delayed") + "</span></small>");
+ this.label_with_specials += (" <small><span weight='light'>[ " + _("Delayed") + " ]</span></small>");
+ else if (this.centered)
+ this.label_with_specials += (" <small><span weight='light'>[ " + _("Centered") + " ]</span></small>");
} else {
this.set_unbound();
@@ -216,6 +235,7 @@ public class Trigger : GLib.Object {
// 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,
diff --git a/vapi/libbamf3.vapi b/vapi/libbamf3.vapi
new file mode 100644
index 0000000..1edeacc
--- /dev/null
+++ b/vapi/libbamf3.vapi
@@ -0,0 +1,166 @@
+/* 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
+ }
+}
diff --git a/vapi/libwnck-3.0.deps b/vapi/libwnck-3.0.deps
new file mode 100644
index 0000000..85f5d99
--- /dev/null
+++ b/vapi/libwnck-3.0.deps
@@ -0,0 +1,2 @@
+gio-2.0
+gtk+-3.0
diff --git a/vapi/libwnck-3.0.vapi b/vapi/libwnck-3.0.vapi
new file mode 100644
index 0000000..94c52a8
--- /dev/null
+++ b/vapi/libwnck-3.0.vapi
@@ -0,0 +1,369 @@
+/* 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<Wnck.Window> 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<Wnck.Window> 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<Wnck.Window> get_windows ();
+ public unowned GLib.List<Wnck.Window> get_windows_stacked ();
+ public unowned Wnck.Workspace get_workspace (int workspace);
+ public int get_workspace_count ();
+ public unowned GLib.List<Wnck.Workspace> 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);
+}
diff --git a/vapi/unique-3.0.deps b/vapi/unique-3.0.deps
new file mode 100644
index 0000000..e762c58
--- /dev/null
+++ b/vapi/unique-3.0.deps
@@ -0,0 +1,8 @@
+gio-2.0
+cairo
+atk
+pango
+gdk-3.0
+gdk-pixbuf-2.0
+gtk+-3.0
+
diff --git a/vapi/unique-3.0.vapi b/vapi/unique-3.0.vapi
new file mode 100644
index 0000000..79f67c5
--- /dev/null
+++ b/vapi/unique-3.0.vapi
@@ -0,0 +1,94 @@
+/* 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;
+}