diff options
62 files changed, 1781 insertions, 4156 deletions
@@ -2,8 +2,6 @@ *.h build/* gnome-pie -Makefile -.valencia *~ gnome-pie.sublime-workspace .pc diff --git a/.valencia b/.valencia deleted file mode 100644 index a9287ae..0000000 --- a/.valencia +++ /dev/null @@ -1,3 +0,0 @@ -version = 1 -build_command = ./make.sh -clean_command = rm -rf build/ @@ -3,6 +3,7 @@ Code: Simon Schneegans <code@simonschneegans.de> Gabriel Dubatti <gdubatti@gmail.com> Francesco Piccinno <stack.box@gmail.com> +György Balló <ballogyor@gmail.com> Translations: diff --git a/CMakeLists.txt b/CMakeLists.txt index cf015a2..2db7e9d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ include(ValaPrecompile) include(ValaVersion) find_package(Vala) -ensure_vala_version("0.11.0" MINIMUM) +ensure_vala_version("0.22.0" MINIMUM) ################################################################ # Configure and find libraries @@ -1,29 +1,2 @@ -#################################################################### -# Compiling and installing Gnome-Pie # -#################################################################### - -First of all, install all dependancies. -For compilation and linking against GTK3: - - sudo apt-get install libgtk-3-dev libcairo2-dev libappindicator3-dev - libgee-dev libxml2-dev libxtst-dev - libgnome-menu-3-dev valac cmake libunique-3.0-dev - libbamf3-dev libwnck-3-dev - -For compilation and linking against GTK2: - - sudo apt-get install libgtk2.0-dev libcairo2-dev libappindicator-dev - libgee-dev libxml2-dev libxtst-dev - libgnome-menu-dev valac cmake libunique-dev - libbamf-dev libwnck-dev - -Then build Gnome-Pie by typing: - ./make.sh - -Launch it with - ./gnome-pie - -If you want to install it system wide use -cd build && sudo make install - -Have fun with this tool! +For intallation intructions, please follow the instructions in +the file README.md! diff --git a/Makefile b/Makefile deleted file mode 100644 index c96c817..0000000 --- a/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -BUILD_ROOT = 1 -PROGRAM=gnome-pie diff --git a/gnome-pie.sublime-project b/gnome-pie.sublime-project index f56473f..011b5a6 100644 --- a/gnome-pie.sublime-project +++ b/gnome-pie.sublime-project @@ -11,12 +11,12 @@ "working_dir": "${project_path}" } ], - "folders": - [ - { - "follow_symlinks": true, - "path": ".", + "folders": + [ + { + "follow_symlinks": true, + "path": ".", "folder_exclude_patterns": ["build"] - } - ] + } + ] } diff --git a/resources/locale/de/LC_MESSAGES/de.po b/resources/locale/de/LC_MESSAGES/de.po index 74e4175..b942915 100644 --- a/resources/locale/de/LC_MESSAGES/de.po +++ b/resources/locale/de/LC_MESSAGES/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gnomepie 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-04-07 08:55+0200\n" +"POT-Creation-Date: 2015-05-02 14:39+0200\n" "PO-Revision-Date: 2011-08-25 21:04+0200\n" "Last-Translator: Simon Schneegans <code@simonschneegans.de>\n" "Language-Team: German\n" @@ -17,6 +17,235 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../ui/pie_options.ui:53 +msgid "Activation Settings" +msgstr "Aktivierungsoptionen" + +#: ../ui/pie_options.ui:153 +msgid "Unamed Pie" +msgstr "Neuer Pie" + +#: ../ui/pie_options.ui:216 +msgid "ID:" +msgstr "ID:" + +#: ../ui/pie_options.ui:234 +msgid "It's possible to bind mouse buttons as well!" +msgstr "Es ist auch möglich, Maustasten zu binden!" + +#: ../ui/pie_options.ui:274 +msgid "Turbo mode" +msgstr "Turbo-Mode" + +#: ../ui/pie_options.ui:280 ../ui/pie_options.ui:281 +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/pie_options.ui:293 +msgid "Long press for activation" +msgstr "Verzögerte Aktivierung" + +#: ../ui/pie_options.ui:299 ../ui/pie_options.ui:300 +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/pie_options.ui:312 +msgid "Open Pie centered on the screen" +msgstr "Zentriert auf dem Bildschirm öffnen" + +#: ../ui/pie_options.ui:318 ../ui/pie_options.ui:319 +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/pie_options.ui:331 +msgid "Warp mouse pointer to center of Pie" +msgstr "Bewege den Mauszeiger zur Mitte des Pies" + +#: ../ui/pie_options.ui:337 ../ui/pie_options.ui:338 +msgid "" +"If checked, the mouse pointer will be warped to the center of the Pie. This " +"allows for quick selections even if the Pie is opened at the screen's " +"boundary." +msgstr "" +"Falls aktiviert, wird der Mauszeiger nach dem dem Öffenen des Pies zu dessen " +"Mitte bewegt. Dadurch kann auch an den Seiten des Bildschirms schnell " +"selektiert werden." + +#: ../ui/pie_options.ui:356 +msgid "Activation options" +msgstr "Aktivierungsoptionen" + +#: ../ui/pie_options.ui:547 +msgid "Automatically select the best pie shape" +msgstr "Wähle die Anordnung automatisch" + +#: ../ui/pie_options.ui:551 +msgid "" +"If checked, the shape will be automatically selected to minimize mouse " +"travelling." +msgstr "" +"Falls aktiviert, wird je nach Position auf dem Bildschirm eine passende " +"Anordnung gweählt." + +#: ../ui/pie_options.ui:571 +msgid "Pie shape" +msgstr "Anordnung" + +#: ../ui/slice_select.ui:8 +msgid "Slice Options" +msgstr "Slice-Optionen" + +#: ../ui/slice_select.ui:140 +msgid "There are no options for this Slice type." +msgstr "Es gibt keine Otionen für diesen Slice-Typ." + +#: ../ui/slice_select.ui:166 +msgid "Name of the Slice " +msgstr "Name" + +#: ../ui/slice_select.ui:204 +msgid "URI to open" +msgstr "URI" + +#: ../ui/slice_select.ui:242 +msgid "Command to execute" +msgstr "Befehl" + +#: ../ui/slice_select.ui:280 +msgid "Hotkey to press" +msgstr "Tastenkomination" + +#: ../ui/slice_select.ui:309 +msgid "Pie to open" +msgstr "Pie" + +#: ../ui/slice_select.ui:338 +msgid "Is Quick Action" +msgstr "Ist Quick Action" + +#: ../ui/slice_select.ui:353 ../ui/slice_select.ui:354 +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:386 +msgid "Slice options" +msgstr "Slice-Optionen" + +#: ../ui/icon_select.ui:9 +msgid "Select an icon" +msgstr "Wähle ein Symbol" + +#: ../ui/icon_select.ui:103 +msgid "Icon Theme" +msgstr "Symbolthema" + +#: ../ui/icon_select.ui:123 +msgid "Custom Icon" +msgstr "Benutzerdefiniertes Symbol" + +#: ../ui/preferences.ui:7 ../../src/gui/preferencesWindow.vala:76 +msgid "Gnome-Pie Settings" +msgstr "Gnome-Pie - Einstellungen" + +#: ../ui/preferences.ui:73 +msgid "Start Gnome-Pie on login" +msgstr "Beim Anmelden automatisch ausführen" + +#: ../ui/preferences.ui:79 ../ui/preferences.ui:80 +msgid "If checked, Gnome-Pie will start silently everytime you log in." +msgstr "Wenn aktiviert, startet Gnome-Pie im Hintergrund beim Anmelden." + +#: ../ui/preferences.ui:92 +msgid "Display panel icon " +msgstr "Zeige ein Symbol im Panel" + +#: ../ui/preferences.ui:98 ../ui/preferences.ui:99 +msgid "" +"If not checked, you can access this menu by launching Gnome-Pie a second " +"time." +msgstr "" +"Falls nicht aktiviert, kann dieses Menü durch ein nochmaliges starten von " +"Gnome-Pie geöffnet werden." + +#: ../ui/preferences.ui:119 +msgid "Activation radius" +msgstr "Aktivierungsentfernung" + +#: ../ui/preferences.ui:157 +msgid "Behavior" +msgstr "Verhalten" + +#: ../ui/preferences.ui:192 +msgid "Display Slice labels" +msgstr "Zeige Namen der Slices" + +#: ../ui/preferences.ui:198 ../ui/preferences.ui:199 +msgid "" +"Displays the name of each Slice next to it. Only available if supported by " +"the theme." +msgstr "" +"Zeigt den Name jeder Slice an. Nur möglich, wenn durch das aktuelle Thema " +"unterstützt." + +#: ../ui/preferences.ui:219 +msgid "Global scale" +msgstr "Skalierungsfaktor" + +#: ../ui/preferences.ui:259 +msgid "Maximum slices per pie" +msgstr "Maximale Zahl von Einträgen pro Pie" + +#: ../ui/preferences.ui:297 +msgid "Appearance" +msgstr "Erscheinungsbild" + +#: ../ui/preferences.ui:326 ../../src/gui/preferencesWindow.vala:107 +msgid "General Settings" +msgstr "Allgemeine Einstellungen" + +#: ../ui/preferences.ui:518 +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:539 +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/preferences.ui:606 ../../src/gui/preferencesWindow.vala:108 +msgid "Pie Settings" +msgstr "Pie-Einstellungen" + #: ../../src/actions/keyAction.vala:34 msgid "Press hotkey" msgstr "Tastenkombination" @@ -54,28 +283,19 @@ 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/preferencesWindow.vala:166 -msgid "No Pie selected." -msgstr "Kein Pie gewählt." +#: ../../src/gui/preferencesWindow.vala:77 +msgid "bake your pies!" +msgstr "mach schöne Kuchen!" -#: ../../src/gui/preferencesWindow.vala:206 +#: ../../src/gui/preferencesWindow.vala:350 msgid "New Pie" msgstr "Neuer Pie" -#: ../../src/gui/preferencesWindow.vala:219 +#: ../../src/gui/preferencesWindow.vala:365 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/triggerSelectWindow.vala:226 -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/piePreview.vala:148 msgid "Do you really want to delete this Slice?" msgstr "Soll die ausgewählte Slice wirklich gelöscht werden?" @@ -109,6 +329,10 @@ msgstr "Slice verschieben" msgid "Click to delete" msgstr "Löschen durch klicken" +#: ../../src/gui/pieList.vala:77 +msgid "Pies" +msgstr "Pie-Menüs" + #: ../../src/gui/iconSelectWindow.vala:182 msgid "All icons" msgstr "Alle Symbole" @@ -142,15 +366,24 @@ msgstr "Sonstige" msgid "All supported image formats" msgstr "Alle unterstützten Bildformate" -#: ../../src/gui/newSliceWindow.vala:291 +#: ../../src/gui/newSliceWindow.vala:292 msgid "Rename me!" msgstr "Benenne mich!" +#: ../../src/gui/pieOptionsWindow.vala:274 +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/themeList.vala:62 msgid "Themes" msgstr "Themen" -#: ../../src/gui/themeList.vala:99 +#: ../../src/gui/themeList.vala:102 msgid "By" msgstr "Von" @@ -174,7 +407,7 @@ msgstr "Schließen" msgid "Press a hotkey ..." msgstr "Wählen..." -#: ../../src/utilities/key.vala:65 ../../src/utilities/bindingManager.vala:177 +#: ../../src/utilities/key.vala:65 ../../src/utilities/bindingManager.vala:186 #: ../../src/utilities/trigger.vala:195 ../../src/utilities/trigger.vala:280 #: ../../src/utilities/trigger.vala:281 msgid "Not bound" @@ -261,6 +494,14 @@ msgstr "Gruppe: Hauptmenü" msgid "Displays your main menu structure." msgstr "Zeigt das Hauptmenü an." +#: ../../src/actionGroups/workspaceWindowListGroup.vala:35 +msgid "Group: Window List for current workspace" +msgstr "Gruppe: Fensterliste für aktive Arbeitsfläche" + +#: ../../src/actionGroups/workspaceWindowListGroup.vala:37 +msgid "Shows a Slice for each of your opened windows on the current workspace." +msgstr "Zeigt eine Slice für jedes geöffnete Fenster der aktiven Arbeitsfläche an." + #: ../../src/actionGroups/sessionGroup.vala:35 msgid "Group: Session Control" msgstr "Gruppe: Sitzung" @@ -346,221 +587,5 @@ msgstr "Maximieren" msgid "Restore" msgstr "Wiederherstellen" -#: ../ui/trigger_select.ui:53 -msgid "Activation Settings" -msgstr "Aktivierungsoptionen" - -#: ../ui/trigger_select.ui:132 -msgid "It's possible to bind mouse buttons as well!" -msgstr "Es ist auch möglich, Maustasten zu binden!" - -#: ../ui/trigger_select.ui:165 -msgid "Turbo mode" -msgstr "Turbo-Mode" - -#: ../ui/trigger_select.ui:171 ../ui/trigger_select.ui:172 -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:184 -msgid "Long press for activation" -msgstr "Verzögerte Aktivierung" - -#: ../ui/trigger_select.ui:190 ../ui/trigger_select.ui:191 -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:203 -msgid "Open Pie centered on the screen" -msgstr "Zentriert auf dem Bildschirm öffnen" - -#: ../ui/trigger_select.ui:209 ../ui/trigger_select.ui:210 -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:222 -msgid "Warp mouse pointer to center of Pie" -msgstr "Bewege den Mauszeiger zur Mitte des Pies" - -#: ../ui/trigger_select.ui:228 ../ui/trigger_select.ui:229 -msgid "" -"If checked, the mouse pointer will be warped to the center of the Pie. This " -"allows for quick selections even if the Pie is opened at the screen's " -"boundary." -msgstr "Falls aktiviert, wird der Mauszeiger nach dem dem Öffenen des Pies zu " -"dessen Mitte bewegt. Dadurch kann auch an den Seiten des Bildschirms schnell " -"selektiert werden." - -#: ../ui/trigger_select.ui:247 -msgid "Activation options" -msgstr "Aktivierungsoptionen" - -#: ../ui/trigger_select.ui:438 -msgid "Automatically select the best pie shape" -msgstr "Wähle die Anordnung automatisch" - -#: ../ui/trigger_select.ui:442 -msgid "" -"If checked, the shape will be automatically selected to minimize mouse " -"travelling." -msgstr "Falls aktiviert, wird je nach Position auf dem Bildschirm eine " -"passende Anordnung gweählt." - -#: ../ui/trigger_select.ui:462 -msgid "Pie shape" -msgstr "Anordnung" - -#: ../ui/slice_select.ui:8 -msgid "Slice Options" -msgstr "Slice-Optionen" - -#: ../ui/slice_select.ui:141 -msgid "There are no options for this Slice type." -msgstr "Es gibt keine Otionen für diesen Slice-Typ." - -#: ../ui/slice_select.ui:167 -msgid "Name of the Slice " -msgstr "Name" - -#: ../ui/slice_select.ui:205 -msgid "URI to open" -msgstr "URI" - -#: ../ui/slice_select.ui:243 -msgid "Command to execute" -msgstr "Befehl" - -#: ../ui/slice_select.ui:281 -msgid "Hotkey to press" -msgstr "Tastenkomination" - -#: ../ui/slice_select.ui:310 -msgid "Pie to open" -msgstr "Pie" - -#: ../ui/slice_select.ui:339 -msgid "Is Quick Action" -msgstr "Ist Quick Action" - -#: ../ui/slice_select.ui:354 ../ui/slice_select.ui:355 -msgid "This Slice will be executed when you click in the middle of the Pie." -msgstr "Diese Slice wird aktiviert, falls du in die Mitte des Pies klickst." - -#: ../ui/slice_select.ui:387 -msgid "Slice options" -msgstr "Slice-Optionen" - -#: ../ui/icon_select.ui:9 -msgid "Select an icon" -msgstr "Wähle ein Symbol" - -#: ../ui/icon_select.ui:103 -msgid "Icon Theme" -msgstr "Symbolthema" - -#: ../ui/icon_select.ui:123 -msgid "Custom Icon" -msgstr "Benutzerdefiniertes Symbol" - -#: ../ui/rename_pie.ui:8 -msgid "Rename a Pie" -msgstr "Pie umbenennen" - -#: ../ui/preferences.ui:7 -msgid "Gnome-Pie Settings" -msgstr "Gnome-Pie - Einstellungen" - -#: ../ui/preferences.ui:27 ../ui/settings.ui:8 -msgid "General Settings" -msgstr "Allgemeine Einstellungen" - -#: ../ui/preferences.ui:266 -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:287 -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/settings.ui:75 -msgid "Start Gnome-Pie on login" -msgstr "Beim Anmelden automatisch ausführen" - -#: ../ui/settings.ui:81 ../ui/settings.ui:82 -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:94 -msgid "Display panel icon " -msgstr "Zeige ein Symbol im Panel" - -#: ../ui/settings.ui:100 ../ui/settings.ui:101 -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:119 -msgid "Behavior" -msgstr "Verhalten" - -#: ../ui/settings.ui:178 -msgid "Global scale" -msgstr "Skalierungsfaktor" - -#: ../ui/settings.ui:217 -msgid "Maximum slices per pie" -msgstr "Maximale Zahl von Einträgen pro Pie" - -#: ../ui/settings.ui:256 -msgid "Maximum activation radius" -msgstr "Maximale Aktivierungsentfernung" - -#: ../ui/settings.ui:287 -msgid "Display Slice labels" -msgstr "Zeige Namen der Slices" - -#: ../ui/settings.ui:293 ../ui/settings.ui:294 -msgid "" -"Displays the name of each Slice next to it. Only available if supported by " -"the theme." -msgstr "" -"Zeigt den Name jeder Slice an. Nur möglich, wenn durch das aktuelle Thema " -"unterstützt." - -#: ../ui/settings.ui:312 -msgid "Appearance" -msgstr "Erscheinungsbild" +#~ msgid "No Pie selected." +#~ msgstr "Kein Pie gewählt." diff --git a/resources/locale/de/LC_MESSAGES/gnomepie.mo b/resources/locale/de/LC_MESSAGES/gnomepie.mo Binary files differindex b888b32..cfdb11f 100644 --- a/resources/locale/de/LC_MESSAGES/gnomepie.mo +++ b/resources/locale/de/LC_MESSAGES/gnomepie.mo diff --git a/resources/locale/gen-pot.sh b/resources/locale/gen-pot.sh index 3938b63..67b0b2c 100755 --- a/resources/locale/gen-pot.sh +++ b/resources/locale/gen-pot.sh @@ -7,30 +7,29 @@ domain="gnomepie" version="0.4" copyright="Simon Schneegans <code@simonschneegans.de>" +rm $domain.pot + filelist=$( find ../ui/ -name '*.ui' -printf "%h/%f " ) xgettext --package-name $domain \ --package-version $version \ --default-domain $domain \ - --output $domain.pot.tmp \ + --output $domain.pot \ --copyright-holder="$copyright" \ --from-code utf-8 \ -k_ \ -L Glade \ $filelist -filelist=$( find ../../src/ -name '*.vala' -printf "%h/%f " ) +filelist=$( find ../../src/ -name '*.vala' -printf "%h/%f " ) xgettext --package-name $domain \ --package-version $version \ --default-domain $domain \ --output $domain.pot \ --copyright-holder="$copyright" \ --from-code utf-8 \ + --join-existing \ -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 +sed --in-place $domain.pot --expression='s/CHARSET/UTF-8/' diff --git a/resources/locale/gnomepie.pot b/resources/locale/gnomepie.pot index b87c651..f3231ac 100644 --- a/resources/locale/gnomepie.pot +++ b/resources/locale/gnomepie.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gnomepie 0.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-04-07 08:55+0200\n" +"POT-Creation-Date: 2015-05-02 14:39+0200\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" @@ -17,6 +17,209 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +#: ../ui/pie_options.ui:53 +msgid "Activation Settings" +msgstr "" + +#: ../ui/pie_options.ui:153 +msgid "Unamed Pie" +msgstr "" + +#: ../ui/pie_options.ui:216 +msgid "ID:" +msgstr "" + +#: ../ui/pie_options.ui:234 +msgid "It's possible to bind mouse buttons as well!" +msgstr "" + +#: ../ui/pie_options.ui:274 +msgid "Turbo mode" +msgstr "" + +#: ../ui/pie_options.ui:280 ../ui/pie_options.ui:281 +msgid "If checked, the Pie will close when you release the chosen hot key." +msgstr "" + +#: ../ui/pie_options.ui:293 +msgid "Long press for activation" +msgstr "" + +#: ../ui/pie_options.ui:299 ../ui/pie_options.ui:300 +msgid "" +"If checked, the Pie will only open if you press this hot key a bit longer." +msgstr "" + +#: ../ui/pie_options.ui:312 +msgid "Open Pie centered on the screen" +msgstr "" + +#: ../ui/pie_options.ui:318 ../ui/pie_options.ui:319 +msgid "" +"If checked, the Pie will open in the middle of your screen. Else it will pop " +"up at your pointer." +msgstr "" + +#: ../ui/pie_options.ui:331 +msgid "Warp mouse pointer to center of Pie" +msgstr "" + +#: ../ui/pie_options.ui:337 ../ui/pie_options.ui:338 +msgid "" +"If checked, the mouse pointer will be warped to the center of the Pie. This " +"allows for quick selections even if the Pie is opened at the screen's " +"boundary." +msgstr "" + +#: ../ui/pie_options.ui:356 +msgid "Activation options" +msgstr "" + +#: ../ui/pie_options.ui:547 +msgid "Automatically select the best pie shape" +msgstr "" + +#: ../ui/pie_options.ui:551 +msgid "" +"If checked, the shape will be automatically selected to minimize mouse " +"travelling." +msgstr "" + +#: ../ui/pie_options.ui:571 +msgid "Pie shape" +msgstr "" + +#: ../ui/slice_select.ui:8 +msgid "Slice Options" +msgstr "" + +#: ../ui/slice_select.ui:140 +msgid "There are no options for this Slice type." +msgstr "" + +#: ../ui/slice_select.ui:166 +msgid "Name of the Slice " +msgstr "" + +#: ../ui/slice_select.ui:204 +msgid "URI to open" +msgstr "" + +#: ../ui/slice_select.ui:242 +msgid "Command to execute" +msgstr "" + +#: ../ui/slice_select.ui:280 +msgid "Hotkey to press" +msgstr "" + +#: ../ui/slice_select.ui:309 +msgid "Pie to open" +msgstr "" + +#: ../ui/slice_select.ui:338 +msgid "Is Quick Action" +msgstr "" + +#: ../ui/slice_select.ui:353 ../ui/slice_select.ui:354 +msgid "This Slice will be executed when you click in the middle of the Pie." +msgstr "" + +#: ../ui/slice_select.ui:386 +msgid "Slice options" +msgstr "" + +#: ../ui/icon_select.ui:9 +msgid "Select an icon" +msgstr "" + +#: ../ui/icon_select.ui:103 +msgid "Icon Theme" +msgstr "" + +#: ../ui/icon_select.ui:123 +msgid "Custom Icon" +msgstr "" + +#: ../ui/preferences.ui:7 ../../src/gui/preferencesWindow.vala:76 +msgid "Gnome-Pie Settings" +msgstr "" + +#: ../ui/preferences.ui:73 +msgid "Start Gnome-Pie on login" +msgstr "" + +#: ../ui/preferences.ui:79 ../ui/preferences.ui:80 +msgid "If checked, Gnome-Pie will start silently everytime you log in." +msgstr "" + +#: ../ui/preferences.ui:92 +msgid "Display panel icon " +msgstr "" + +#: ../ui/preferences.ui:98 ../ui/preferences.ui:99 +msgid "" +"If not checked, you can access this menu by launching Gnome-Pie a second " +"time." +msgstr "" + +#: ../ui/preferences.ui:119 +msgid "Activation radius" +msgstr "" + +#: ../ui/preferences.ui:157 +msgid "Behavior" +msgstr "" + +#: ../ui/preferences.ui:192 +msgid "Display Slice labels" +msgstr "" + +#: ../ui/preferences.ui:198 ../ui/preferences.ui:199 +msgid "" +"Displays the name of each Slice next to it. Only available if supported by " +"the theme." +msgstr "" + +#: ../ui/preferences.ui:219 +msgid "Global scale" +msgstr "" + +#: ../ui/preferences.ui:259 +msgid "Maximum slices per pie" +msgstr "" + +#: ../ui/preferences.ui:297 +msgid "Appearance" +msgstr "" + +#: ../ui/preferences.ui:326 ../../src/gui/preferencesWindow.vala:107 +msgid "General Settings" +msgstr "" + +#: ../ui/preferences.ui:518 +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:539 +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/preferences.ui:606 ../../src/gui/preferencesWindow.vala:108 +msgid "Pie Settings" +msgstr "" + #: ../../src/actions/keyAction.vala:34 msgid "Press hotkey" msgstr "" @@ -53,26 +256,19 @@ msgstr "" msgid "Opens another Pie of Gnome-Pie. You may create sub menus this way." msgstr "" -#: ../../src/gui/preferencesWindow.vala:166 -msgid "No Pie selected." +#: ../../src/gui/preferencesWindow.vala:77 +msgid "bake your pies!" msgstr "" -#: ../../src/gui/preferencesWindow.vala:206 +#: ../../src/gui/preferencesWindow.vala:350 msgid "New Pie" msgstr "" -#: ../../src/gui/preferencesWindow.vala:219 +#: ../../src/gui/preferencesWindow.vala:365 msgid "" "Do you really want to delete the selected Pie with all contained Slices?" msgstr "" -#: ../../src/gui/triggerSelectWindow.vala:226 -msgid "" -"This hotkey is already assigned to the pie \"%s\"! \n" -"\n" -"Please select another one or cancel your selection." -msgstr "" - #: ../../src/gui/piePreview.vala:148 msgid "Do you really want to delete this Slice?" msgstr "" @@ -106,6 +302,10 @@ msgstr "" msgid "Click to delete" msgstr "" +#: ../../src/gui/pieList.vala:77 +msgid "Pies" +msgstr "" + #: ../../src/gui/iconSelectWindow.vala:182 msgid "All icons" msgstr "" @@ -139,15 +339,22 @@ msgstr "" msgid "All supported image formats" msgstr "" -#: ../../src/gui/newSliceWindow.vala:291 +#: ../../src/gui/newSliceWindow.vala:292 msgid "Rename me!" msgstr "" +#: ../../src/gui/pieOptionsWindow.vala:274 +msgid "" +"This hotkey is already assigned to the pie \"%s\"! \n" +"\n" +"Please select another one or cancel your selection." +msgstr "" + #: ../../src/gui/themeList.vala:62 msgid "Themes" msgstr "" -#: ../../src/gui/themeList.vala:99 +#: ../../src/gui/themeList.vala:102 msgid "By" msgstr "" @@ -171,7 +378,7 @@ msgstr "" msgid "Press a hotkey ..." msgstr "" -#: ../../src/utilities/key.vala:65 ../../src/utilities/bindingManager.vala:177 +#: ../../src/utilities/key.vala:65 ../../src/utilities/bindingManager.vala:186 #: ../../src/utilities/trigger.vala:195 ../../src/utilities/trigger.vala:280 #: ../../src/utilities/trigger.vala:281 msgid "Not bound" @@ -257,6 +464,14 @@ msgstr "" msgid "Displays your main menu structure." msgstr "" +#: ../../src/actionGroups/workspaceWindowListGroup.vala:35 +msgid "Group: Window List for current workspace" +msgstr "" + +#: ../../src/actionGroups/workspaceWindowListGroup.vala:37 +msgid "Shows a Slice for each of your opened windows on the current workspace." +msgstr "" + #: ../../src/actionGroups/sessionGroup.vala:35 msgid "Group: Session Control" msgstr "" @@ -340,198 +555,3 @@ msgstr "" #: ../../src/pies/defaultConfig.vala:63 msgid "Restore" msgstr "" - -#: ../ui/trigger_select.ui:53 -msgid "Activation Settings" -msgstr "" - -#: ../ui/trigger_select.ui:132 -msgid "It's possible to bind mouse buttons as well!" -msgstr "" - -#: ../ui/trigger_select.ui:165 -msgid "Turbo mode" -msgstr "" - -#: ../ui/trigger_select.ui:171 ../ui/trigger_select.ui:172 -msgid "If checked, the Pie will close when you release the chosen hot key." -msgstr "" - -#: ../ui/trigger_select.ui:184 -msgid "Long press for activation" -msgstr "" - -#: ../ui/trigger_select.ui:190 ../ui/trigger_select.ui:191 -msgid "" -"If checked, the Pie will only open if you press this hot key a bit longer." -msgstr "" - -#: ../ui/trigger_select.ui:203 -msgid "Open Pie centered on the screen" -msgstr "" - -#: ../ui/trigger_select.ui:209 ../ui/trigger_select.ui:210 -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:222 -msgid "Warp mouse pointer to center of Pie" -msgstr "" - -#: ../ui/trigger_select.ui:228 ../ui/trigger_select.ui:229 -msgid "" -"If checked, the mouse pointer will be warped to the center of the Pie. This " -"allows for quick selections even if the Pie is opened at the screen's " -"boundary." -msgstr "" - -#: ../ui/trigger_select.ui:247 -msgid "Activation options" -msgstr "" - -#: ../ui/trigger_select.ui:438 -msgid "Automatically select the best pie shape" -msgstr "" - -#: ../ui/trigger_select.ui:442 -msgid "" -"If checked, the shape will be automatically selected to minimize mouse " -"travelling." -msgstr "" - -#: ../ui/trigger_select.ui:462 -msgid "Pie shape" -msgstr "" - -#: ../ui/slice_select.ui:8 -msgid "Slice Options" -msgstr "" - -#: ../ui/slice_select.ui:141 -msgid "There are no options for this Slice type." -msgstr "" - -#: ../ui/slice_select.ui:167 -msgid "Name of the Slice " -msgstr "" - -#: ../ui/slice_select.ui:205 -msgid "URI to open" -msgstr "" - -#: ../ui/slice_select.ui:243 -msgid "Command to execute" -msgstr "" - -#: ../ui/slice_select.ui:281 -msgid "Hotkey to press" -msgstr "" - -#: ../ui/slice_select.ui:310 -msgid "Pie to open" -msgstr "" - -#: ../ui/slice_select.ui:339 -msgid "Is Quick Action" -msgstr "" - -#: ../ui/slice_select.ui:354 ../ui/slice_select.ui:355 -msgid "This Slice will be executed when you click in the middle of the Pie." -msgstr "" - -#: ../ui/slice_select.ui:387 -msgid "Slice options" -msgstr "" - -#: ../ui/icon_select.ui:9 -msgid "Select an icon" -msgstr "" - -#: ../ui/icon_select.ui:103 -msgid "Icon Theme" -msgstr "" - -#: ../ui/icon_select.ui:123 -msgid "Custom Icon" -msgstr "" - -#: ../ui/rename_pie.ui:8 -msgid "Rename a Pie" -msgstr "" - -#: ../ui/preferences.ui:7 -msgid "Gnome-Pie Settings" -msgstr "" - -#: ../ui/preferences.ui:27 ../ui/settings.ui:8 -msgid "General Settings" -msgstr "" - -#: ../ui/preferences.ui:266 -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:287 -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/settings.ui:75 -msgid "Start Gnome-Pie on login" -msgstr "" - -#: ../ui/settings.ui:81 ../ui/settings.ui:82 -msgid "If checked, Gnome-Pie will start silently everytime you log in." -msgstr "" - -#: ../ui/settings.ui:94 -msgid "Display panel icon " -msgstr "" - -#: ../ui/settings.ui:100 ../ui/settings.ui:101 -msgid "" -"If not checked, you can access this menu by launching Gnome-Pie a second " -"time." -msgstr "" - -#: ../ui/settings.ui:119 -msgid "Behavior" -msgstr "" - -#: ../ui/settings.ui:178 -msgid "Global scale" -msgstr "" - -#: ../ui/settings.ui:217 -msgid "Maximum slices per pie" -msgstr "" - -#: ../ui/settings.ui:256 -msgid "Maximum activation radius" -msgstr "" - -#: ../ui/settings.ui:287 -msgid "Display Slice labels" -msgstr "" - -#: ../ui/settings.ui:293 ../ui/settings.ui:294 -msgid "" -"Displays the name of each Slice next to it. Only available if supported by " -"the theme." -msgstr "" - -#: ../ui/settings.ui:312 -msgid "Appearance" -msgstr "" diff --git a/resources/ui/trigger_select.ui b/resources/ui/pie_options.ui index ab12270..cc95f8f 100644 --- a/resources/ui/trigger_select.ui +++ b/resources/ui/pie_options.ui @@ -63,6 +63,8 @@ <child internal-child="action_area"> <object class="GtkButtonBox" id="dialog-action_area1"> <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="homogeneous">True</property> <property name="layout_style">end</property> <child> <object class="GtkButton" id="cancel-button"> @@ -71,12 +73,13 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> + <property name="hexpand">True</property> <property name="use_stock">True</property> </object> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">0</property> + <property name="position">1</property> </packing> </child> <child> @@ -91,12 +94,12 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">1</property> + <property name="position">2</property> </packing> </child> </object> <packing> - <property name="expand">False</property> + <property name="expand">True</property> <property name="fill">True</property> <property name="pack_type">end</property> <property name="position">0</property> @@ -110,34 +113,140 @@ <property name="orientation">vertical</property> <property name="spacing">6</property> <child> - <object class="GtkBox" id="trigger-box"> + <object class="GtkBox" id="hbox2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="orientation">vertical</property> <child> - <placeholder/> + <object class="GtkButton" id="icon-button"> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</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="GtkBox" id="pie-box"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_left">6</property> + <property name="orientation">vertical</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="has_focus">True</property> + <property name="text" translatable="yes">Unamed Pie</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="trigger-box"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</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> + <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">True</property> + <property name="expand">False</property> <property name="fill">True</property> <property name="position">0</property> </packing> </child> <child> - <object class="GtkLabel" id="label1"> + <object class="GtkBox" id="box1"> <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> + <property name="margin_bottom">6</property> + <child> + <object class="GtkLabel" id="pie-id"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">ID:</property> + <property name="ellipsize">middle</property> + <attributes> + <attribute name="weight" value="light"/> + <attribute name="scale" value="0.80000000000000004"/> + </attributes> + </object> + <packing> + <property name="expand">False</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> </object> <packing> <property name="expand">False</property> - <property name="fill">False</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> diff --git a/resources/ui/preferences.ui b/resources/ui/preferences.ui index 7712566..4ef781d 100644 --- a/resources/ui/preferences.ui +++ b/resources/ui/preferences.ui @@ -7,107 +7,301 @@ <property name="title" translatable="yes">Gnome-Pie Settings</property> <property name="window_position">center</property> <child> - <object class="GtkBox" id="vbox2"> - <property name="width_request">625</property> + <object class="GtkBox" id="main-box"> + <property name="width_request">650</property> <property name="height_request">500</property> <property name="visible">True</property> <property name="can_focus">False</property> <property name="orientation">vertical</property> <child> - <object class="GtkToolbar" id="toolbar"> + <object class="GtkNotebook" id="notebook"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="toolbar_style">both-horiz</property> + <property name="can_focus">True</property> + <property name="show_border">False</property> <child> - <object class="GtkToolButton" id="settings-button"> - <property name="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">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="GtkBox" id="main-vbox1"> - <property name="can_focus">False</property> - <property name="border_width">10</property> - <property name="orientation">vertical</property> - <property name="spacing">10</property> - <child> - <object class="GtkBox" id="hbox1"> + <object class="GtkBox" id="general-settings"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="border_width">10</property> + <property name="orientation">vertical</property> <property name="spacing">6</property> <child> - <object class="GtkBox" id="pie-list-box"> + <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> + <child> + <object class="GtkBox" id="box2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="orientation">vertical</property> + <property name="spacing">6</property> + <property name="homogeneous">True</property> <child> - <object class="GtkScrolledWindow" id="pies-scrolledwindow"> - <property name="width_request">170</property> + <object class="GtkFrame" id="frame2"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">never</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> <property name="shadow_type">in</property> <child> - <placeholder/> + <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="GtkBox" id="vbox5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</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="use_action_appearance">False</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="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="use_action_appearance">False</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="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="GtkBox" id="hbox4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="homogeneous">True</property> + <child> + <object class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">Activation radius</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScale" id="range-hscale"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="fill_level">2000</property> + <property name="round_digits">0</property> + <property name="digits">0</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">2</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Behavior</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> </child> </object> <packing> - <property name="expand">True</property> + <property name="expand">False</property> <property name="fill">True</property> <property name="position">0</property> </packing> </child> <child> - <object class="GtkToolbar" id="pies-toolbar"> + <object class="GtkFrame" id="frame3"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="toolbar_style">icons</property> - <property name="icon_size">1</property> + <property name="label_xalign">0</property> + <property name="shadow_type">in</property> <child> - <object class="GtkToolButton" id="add-pie-button"> - <property name="use_action_appearance">False</property> + <object class="GtkAlignment" id="alignment3"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="use_underline">True</property> - <property name="icon_name">list-add-symbolic</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="GtkBox" id="vbox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkCheckButton" id="captions-checkbox"> + <property name="label" translatable="yes">Display Slice labels</property> + <property name="use_action_appearance">False</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">Displays the name of each Slice next to it. Only available if supported by the theme.</property> + <property name="tooltip_text" translatable="yes">Displays the name of each Slice next to it. Only available if supported by the theme.</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="GtkBox" id="hbox2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="homogeneous">True</property> + <child> + <object class="GtkLabel" id="label6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">Global scale</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScale" 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">2</property> + </packing> + </child> + <child> + <object class="GtkBox" id="hbox3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="homogeneous">True</property> + <child> + <object class="GtkLabel" id="label7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">Maximum slices per pie</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScale" id="range-slices"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="fill_level">2000</property> + <property name="round_digits">0</property> + <property name="digits">0</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> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> </child> - <child> - <object class="GtkToolButton" id="remove-pie-button"> - <property name="use_action_appearance">False</property> + <child type="label"> + <object class="GtkLabel" id="label8"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="use_underline">True</property> - <property name="icon_name">list-remove-symbolic</property> + <property name="label" translatable="yes">Appearance</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> </child> </object> <packing> - <property name="expand">False</property> + <property name="expand">True</property> <property name="fill">True</property> <property name="position">1</property> </packing> @@ -116,124 +310,175 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">0</property> + <property name="position">2</property> </packing> </child> + </object> + <packing> + <property name="tab_expand">True</property> + </packing> + </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">General Settings</property> + </object> + <packing> + <property name="tab_expand">True</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <object class="GtkBox" id="pie-settings"> + <property name="can_focus">False</property> + <property name="border_width">10</property> + <property name="orientation">vertical</property> + <property name="spacing">10</property> <child> - <object class="GtkBox" id="pie-box"> + <object class="GtkBox" id="hbox1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="orientation">vertical</property> <property name="spacing">6</property> <child> - <object class="GtkBox" id="hbox2"> + <object class="GtkBox" id="pie-list-box"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="spacing">6</property> + <property name="orientation">vertical</property> <child> - <object class="GtkButton" id="icon-button"> - <property name="use_action_appearance">False</property> + <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="receives_default">True</property> - <property name="relief">none</property> - <property name="focus_on_click">False</property> + <property name="hscrollbar_policy">never</property> + <property name="shadow_type">in</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> + <placeholder/> </child> </object> <packing> - <property name="expand">False</property> + <property name="expand">True</property> <property name="fill">True</property> <property name="position">0</property> </packing> </child> <child> - <object class="GtkBox" id="pie-box1"> + <object class="GtkToolbar" id="pies-toolbar"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="orientation">vertical</property> + <property name="toolbar_style">icons</property> + <property name="icon_size">1</property> <child> - <object class="GtkButton" id="rename-button"> - <property name="use_action_appearance">False</property> + <object class="GtkToolItem" id="add-remove-item"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="relief">none</property> - <property name="use_underline">True</property> - <property name="focus_on_click">False</property> + <property name="can_focus">False</property> <child> - <object class="GtkLabel" id="pie-name-label"> + <object class="GtkBox" id="add-remove-box"> <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> + <child> + <object class="GtkButton" id="add-pie-button"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <child> + <object class="GtkImage" id="up_image"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="icon_name">list-add-symbolic</property> + <property name="icon_size">1</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="GtkButton" id="remove-pie-button"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <child> + <object class="GtkImage" id="down_image"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="icon_name">list-remove-symbolic</property> + <property name="icon_size">1</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> </object> </child> </object> <packing> + <property name="expand">False</property> + <property name="homogeneous">False</property> + </packing> + </child> + <child> + <object class="GtkSeparatorToolItem" id="sep1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="draw">False</property> + </object> + <packing> <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">0</property> + <property name="homogeneous">False</property> </packing> </child> <child> - <object class="GtkButton" id="key-button"> - <property name="use_action_appearance">False</property> + <object class="GtkToolItem" id="edit-item"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="relief">none</property> - <property name="use_underline">True</property> - <property name="focus_on_click">False</property> + <property name="can_focus">False</property> <child> - <object class="GtkLabel" id="hotkey-label"> + <object class="GtkBox" id="edit-box"> <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> + <child> + <object class="GtkButton" id="edit-pie-button"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <child> + <object class="GtkImage" id="settings_image"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="icon_name">emblem-system-symbolic</property> + <property name="icon_size">1</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> </object> </child> </object> <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">1</property> + <property name="expand">False</property> + <property name="homogeneous">False</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> + <style> + <class name="inline-toolbar"/> + </style> </object> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">2</property> + <property name="position">1</property> </packing> </child> </object> @@ -244,81 +489,94 @@ </packing> </child> <child> - <object class="GtkFrame" id="preview-frame"> + <object class="GtkBox" id="pie-box"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label_xalign">0</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> <child> - <object class="GtkEventBox" id="preview-background"> + <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="GtkBox" id="pie-edit-box"> + <object class="GtkEventBox" id="preview-background"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="border_width">2</property> - <property name="orientation">vertical</property> <child> - <object class="GtkLabel" id="no-slice-label"> + <object class="GtkBox" id="pie-edit-box"> + <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xpad">6</property> - <property name="ypad">6</property> - <property name="label" translatable="yes"><b><big>This Pie is empty!</big> + <property name="border_width">2</property> + <property name="orientation">vertical</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"><b><big>This Pie is empty!</big> Start adding Slices to it!</b> This can be done by dragging stuff to the plus sign below. You can try a lot! For example application launchers or folders. Even URLs from your browser are possible... For manual and advanced configuration click on the plus sign.</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"><b><big>You have no Pies!</big> + <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"><b><big>You have no Pies!</big> Start by creating one! </b> This can be done by clicking on the tiny little plus sign in the lower left corner.</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="GtkBox" id="preview-box"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</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> - <placeholder/> + <object class="GtkBox" id="preview-box"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">True</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">2</property> - </packing> </child> </object> </child> + <child type="label_item"> + <placeholder/> + </child> </object> - </child> - <child type="label_item"> - <placeholder/> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> </child> </object> <packing> @@ -331,16 +589,33 @@ Start by creating one! </b> This can be done by clicking on the tiny littl <packing> <property name="expand">True</property> <property name="fill">True</property> - <property name="position">1</property> + <property name="position">0</property> </packing> </child> </object> <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">0</property> + <property name="position">1</property> + <property name="tab_expand">True</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">Pie Settings</property> + </object> + <packing> + <property name="position">1</property> + <property name="tab_expand">True</property> + <property name="tab_fill">False</property> </packing> </child> + <child> + <placeholder/> + </child> + <child type="tab"> + <placeholder/> + </child> </object> <packing> <property name="expand">True</property> diff --git a/resources/ui/rename_pie.ui b/resources/ui/rename_pie.ui deleted file mode 100644 index fca075c..0000000 --- a/resources/ui/rename_pie.ui +++ /dev/null @@ -1,95 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.18.3 --> -<interface> - <requires lib="gtk+" version="3.8"/> - <object class="GtkDialog" id="window"> - <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> - <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="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</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="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</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="GtkBox" id="vbox2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="border_width">6</property> - <property name="orientation">vertical</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 deleted file mode 100644 index b2d2776..0000000 --- a/resources/ui/settings.ui +++ /dev/null @@ -1,338 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.18.3 --> -<interface> - <requires lib="gtk+" version="3.8"/> - <object class="GtkDialog" id="window"> - <property name="can_focus">False</property> - <property name="border_width">5</property> - <property name="title" translatable="yes">General Settings</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> - <child internal-child="vbox"> - <object class="GtkBox" id="dialog-vbox1"> - <property name="width_request">550</property> - <property name="height_request">450</property> - <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="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</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="GtkBox" id="vbox4"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="border_width">6</property> - <property name="orientation">vertical</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="GtkBox" id="vbox5"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</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="use_action_appearance">False</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="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="use_action_appearance">False</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="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> - </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">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="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="GtkBox" id="vbox1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <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">0</property> - </packing> - </child> - <child> - <object class="GtkBox" id="hbox1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="homogeneous">True</property> - <child> - <object class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Global scale</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkScale" 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> - </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">1</property> - </packing> - </child> - <child> - <object class="GtkBox" id="hbox2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="homogeneous">True</property> - <child> - <object class="GtkLabel" id="label2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Maximum slices per pie</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkScale" id="range-slices"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="fill_level">2000</property> - <property name="round_digits">0</property> - <property name="digits">0</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">2</property> - </packing> - </child> - <child> - <object class="GtkBox" id="hbox3"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="homogeneous">True</property> - <child> - <object class="GtkLabel" id="label4"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Maximum activation radius</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkScale" id="range-hscale"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="fill_level">2000</property> - <property name="round_digits">0</property> - <property name="digits">0</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> - <child> - <object class="GtkCheckButton" id="captions-checkbox"> - <property name="label" translatable="yes">Display Slice labels</property> - <property name="use_action_appearance">False</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">Displays the name of each Slice next to it. Only available if supported by the theme.</property> - <property name="tooltip_text" translatable="yes">Displays the name of each Slice next to it. Only available if supported by the theme.</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">4</property> - </packing> - </child> - </object> - </child> - </object> - </child> - <child type="label"> - <object class="GtkLabel" id="label5"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Appearance</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - </child> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">4</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 index e3bab16..27559ad 100644 --- a/resources/ui/slice_select.ui +++ b/resources/ui/slice_select.ui @@ -106,7 +106,6 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="relief">none</property> <child> <object class="GtkImage" id="icon"> <property name="visible">True</property> diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index af412a6..4d1194f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -23,7 +23,6 @@ vala_precompile( PACKAGES ${VALA_PKGS} OPTIONS - --vapidir=${CMAKE_SOURCE_DIR}/vapi/ --thread ${DEFINES} ) diff --git a/src/actionGroups/devicesGroup.vala b/src/actionGroups/devicesGroup.vala index 1078296..e18f4c0 100644 --- a/src/actionGroups/devicesGroup.vala +++ b/src/actionGroups/devicesGroup.vala @@ -33,7 +33,7 @@ public class DevicesGroup : ActionGroup { public static GroupRegistry.TypeDescription register() { var description = new GroupRegistry.TypeDescription(); description.name = _("Group: Devices"); - description.icon = "harddrive"; + description.icon = "drive-harddisk"; description.description = _("Shows a Slice for each plugged in devices, like USB-Sticks."); description.id = "devices"; return description; @@ -82,7 +82,7 @@ public class DevicesGroup : ActionGroup { private void load() { // add root device - this.add_action(new UriAction(_("Root"), "harddrive", "file:///")); + this.add_action(new UriAction(_("Root"), "drive-harddisk", "file:///")); // add all other devices foreach(var mount in this.monitor.get_mounts()) { diff --git a/src/actionGroups/groupRegistry.vala b/src/actionGroups/groupRegistry.vala index ca0dc4d..ebf34ba 100644 --- a/src/actionGroups/groupRegistry.vala +++ b/src/actionGroups/groupRegistry.vala @@ -72,6 +72,10 @@ public class GroupRegistry : GLib.Object { type_description = WindowListGroup.register(); types.add(typeof(WindowListGroup).name()); descriptions.set(typeof(WindowListGroup).name(), type_description); + + type_description = WorkspaceWindowListGroup.register(); + types.add(typeof(WorkspaceWindowListGroup).name()); + descriptions.set(typeof(WorkspaceWindowListGroup).name(), type_description); } ///////////////////////////////////////////////////////////////////// @@ -85,6 +89,7 @@ public class GroupRegistry : GLib.Object { case "menu": return new MenuGroup(parent_id); case "session": return new SessionGroup(parent_id); case "window_list": return new WindowListGroup(parent_id); + case "workspace_window_list": return new WorkspaceWindowListGroup(parent_id); } return null; diff --git a/src/actionGroups/menuGroup.vala b/src/actionGroups/menuGroup.vala index 7a1e344..ccb5407 100644 --- a/src/actionGroups/menuGroup.vala +++ b/src/actionGroups/menuGroup.vala @@ -33,7 +33,7 @@ public class MenuGroup : ActionGroup { public static GroupRegistry.TypeDescription register() { var description = new GroupRegistry.TypeDescription(); description.name = _("Group: Main menu"); - description.icon = "gnome-main-menu"; + description.icon = "start-here"; 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 7b989a6..42afafc 100644 --- a/src/actionGroups/sessionGroup.vala +++ b/src/actionGroups/sessionGroup.vala @@ -33,7 +33,7 @@ public class SessionGroup : ActionGroup { public static GroupRegistry.TypeDescription register() { var description = new GroupRegistry.TypeDescription(); description.name = _("Group: Session Control"); - description.icon = "gnome-logout"; + description.icon = "system-log-out"; description.description = _("Shows a Slice for Shutdown, Reboot, and Hibernate."); description.id = "session"; return description; @@ -57,14 +57,14 @@ public class SessionGroup : ActionGroup { // iface = GLib.Bus.get_proxy_sync(GLib.BusType.SESSION, "org.kde.ksmserver", "/KSMServer"); // iface = GLib.Bus.get_proxy_sync(GLib.BusType.SESSION, "org.freedesktop.ConsoleKit", "/org/freedesktop/ConsoleKit/Manager"); - this.add_action(new AppAction(_("Shutdown"), "gnome-shutdown", - "dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.RequestShutdown")); + this.add_action(new AppAction(_("Shutdown"), "system-shutdown", + "dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Shutdown")); - this.add_action(new AppAction(_("Logout"), "gnome-session-logout", + this.add_action(new AppAction(_("Logout"), "system-log-out", "dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Logout uint32:1")); - this.add_action(new AppAction(_("Reboot"), "gnome-session-reboot", - "dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.RequestReboot")); + this.add_action(new AppAction(_("Reboot"), "view-refresh", + "dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Reboot")); } // TODO: check for available interfaces --- these may work too: diff --git a/src/actionGroups/windowListGroup.vala b/src/actionGroups/windowListGroup.vala index a2dc19c..1560f5f 100644 --- a/src/actionGroups/windowListGroup.vala +++ b/src/actionGroups/windowListGroup.vala @@ -32,7 +32,7 @@ public class WindowListGroup : ActionGroup { public static GroupRegistry.TypeDescription register() { var description = new GroupRegistry.TypeDescription(); description.name = _("Group: Window List"); - description.icon = "gnome-window-manager"; + description.icon = "preferences-system-windows"; description.description = _("Shows a Slice for each of your opened Windows. Almost like Alt-Tab."); description.id = "window_list"; return description; @@ -94,21 +94,37 @@ public class WindowListGroup : ActionGroup { (bamf_app == null) ? application.get_icon_name().down() : bamf_app.get_icon(), "%lu".printf(window.get_xid()) ); - action.activated.connect(() => { + action.activated.connect((time_stamp) => { Wnck.Screen.get_default().force_update(); var xid = (X.Window)uint64.parse(action.real_command); var win = Wnck.Window.get(xid); - var time = Gtk.get_current_event_time(); - if (win.get_workspace() != null - && win.get_workspace() != win.get_screen().get_active_workspace()) - win.get_workspace().activate(time); + if (win.get_workspace() != null) { + //select the workspace + if (win.get_workspace() != win.get_screen().get_active_workspace()) + win.get_workspace().activate(time_stamp); + + //select the viewport inside the wprkspace + if (!win.is_in_viewport(win.get_workspace()) ) { + int xp, yp, widthp, heightp, scx, scy, nx, ny, wx, wy; + win.get_geometry (out xp, out yp, out widthp, out heightp); + scx= win.get_screen().get_width(); + scy= win.get_screen().get_height(); + wx= win.get_workspace().get_viewport_x(); + wy= win.get_workspace().get_viewport_y(); + if (scx > 0 && scy > 0) { + nx= ((wx+xp) / scx) * scx; + ny= ((wy+yp) / scy) * scy; + win.get_screen().move_viewport(nx, ny); + } + } + } if (win.is_minimized()) - win.unminimize(time); + win.unminimize(time_stamp); - win.activate_transient(time); + win.activate_transient(time_stamp); }); this.add_action(action); } diff --git a/src/actionGroups/workspaceWindowListGroup.vala b/src/actionGroups/workspaceWindowListGroup.vala new file mode 100644 index 0000000..42a4863 --- /dev/null +++ b/src/actionGroups/workspaceWindowListGroup.vala @@ -0,0 +1,145 @@ +///////////////////////////////////////////////////////////////////////// +// Copyright (c) 2011-2015 by Simon Schneegans +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or (at +// your option) any later version. +// +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +///////////////////////////////////////////////////////////////////////// + +namespace GnomePie { + +///////////////////////////////////////////////////////////////////// +/// This group displays a list of all running application windows of +/// the current workspace. +///////////////////////////////////////////////////////////////////// + +public class WorkspaceWindowListGroup : ActionGroup { + + ///////////////////////////////////////////////////////////////////// + /// Used to register this type of ActionGroup. It sets the display + /// name for this ActionGroup, it's icon name and the string used in + /// the pies.conf file for this kind of ActionGroups. + ///////////////////////////////////////////////////////////////////// + + public static GroupRegistry.TypeDescription register() { + var description = new GroupRegistry.TypeDescription(); + description.name = _("Group: Window List for current workspace"); + description.icon = "preferences-system-windows"; + description.description = _("Shows a Slice for each of your opened windows on the current workspace."); + description.id = "workspace_window_list"; + return description; + } + + ///////////////////////////////////////////////////////////////////// + /// Two members needed to avoid useless, frequent changes of the + /// stored Actions. + ///////////////////////////////////////////////////////////////////// + + private bool changing = false; + private bool changed_again = false; + + private Wnck.Screen screen; + + ///////////////////////////////////////////////////////////////////// + /// C'tor, initializes all members. + ///////////////////////////////////////////////////////////////////// + + public WorkspaceWindowListGroup(string parent_id) { + GLib.Object(parent_id : parent_id); + } + + ///////////////////////////////////////////////////////////////////// + /// Loads all windows. + ///////////////////////////////////////////////////////////////////// + + construct { + this.screen = Wnck.Screen.get_default(); + + this.screen.window_opened.connect(reload); + this.screen.window_closed.connect(reload); + this.screen.active_workspace_changed.connect(reload); + + this.load(); + } + + ///////////////////////////////////////////////////////////////////// + /// Loads all currently opened windows and creates actions for them. + ///////////////////////////////////////////////////////////////////// + + private void load() { + unowned GLib.List<Wnck.Window?> windows = this.screen.get_windows(); + + var matcher = Bamf.Matcher.get_default(); + + foreach (var window in windows) { + if (window.get_window_type() == Wnck.WindowType.NORMAL + && !window.is_skip_pager() && !window.is_skip_tasklist() + && window.get_workspace() != null + && window.get_workspace() == this.screen.get_active_workspace()) { + + var application = window.get_application(); + var bamf_app = matcher.get_application_for_xid((uint32)window.get_xid()); + + string name = window.get_name(); + + if (name.length > 30) + name = name.substring(0, 30) + "..."; + + var action = new SigAction( + name, + (bamf_app == null) ? application.get_icon_name().down() : bamf_app.get_icon(), + "%lu".printf(window.get_xid()) + ); + action.activated.connect((time_stamp) => { + Wnck.Screen.get_default().force_update(); + + var xid = (X.Window)uint64.parse(action.real_command); + var win = Wnck.Window.get(xid); + + if (win.is_minimized()) + win.unminimize(time_stamp); + + win.activate_transient(time_stamp); + }); + this.add_action(action); + } + } + } + + ///////////////////////////////////////////////////////////////////// + /// Reloads all running applications. + ///////////////////////////////////////////////////////////////////// + + private void reload() { + // avoid too frequent changes... + if (!this.changing) { + this.changing = true; + Timeout.add(500, () => { + if (this.changed_again) { + this.changed_again = false; + return true; + } + + // reload + this.delete_all(); + this.load(); + + this.changing = false; + return false; + }); + } else { + this.changed_again = true; + } + } +} + +} diff --git a/src/actions/action.vala b/src/actions/action.vala index 91fc448..1e6437e 100644 --- a/src/actions/action.vala +++ b/src/actions/action.vala @@ -71,7 +71,7 @@ public abstract class Action : GLib.Object { /// This one is called, when the user activates the Slice. ///////////////////////////////////////////////////////////////////// - public abstract void activate(); + public abstract void activate(uint32 time_stamp); } } diff --git a/src/actions/appAction.vala b/src/actions/appAction.vala index 859baf8..e1ca3a2 100644 --- a/src/actions/appAction.vala +++ b/src/actions/appAction.vala @@ -63,7 +63,7 @@ public class AppAction : Action { /// Launches the desired command. ///////////////////////////////////////////////////////////////////// - public override void activate() { + public override void activate(uint32 time_stamp) { try{ var item = GLib.AppInfo.create_from_commandline(this.real_command, null, GLib.AppInfoCreateFlags.NONE); item.launch(null, null); diff --git a/src/actions/keyAction.vala b/src/actions/keyAction.vala index 68a2ec1..cbe8b6e 100644 --- a/src/actions/keyAction.vala +++ b/src/actions/keyAction.vala @@ -73,7 +73,7 @@ public class KeyAction : Action { /// Presses the desired key. ///////////////////////////////////////////////////////////////////// - public override void activate() { + public override void activate(uint32 time_stamp) { key.press(); } } diff --git a/src/actions/pieAction.vala b/src/actions/pieAction.vala index 8069ff3..931c9d3 100644 --- a/src/actions/pieAction.vala +++ b/src/actions/pieAction.vala @@ -95,7 +95,7 @@ public class PieAction : Action { /// Opens the desired Pie. ///////////////////////////////////////////////////////////////////// - public override void activate() { + public override void activate(uint32 time_stamp) { PieManager.open_pie(real_command); } } diff --git a/src/actions/sigAction.vala b/src/actions/sigAction.vala index 4eebbca..bf9374d 100644 --- a/src/actions/sigAction.vala +++ b/src/actions/sigAction.vala @@ -29,7 +29,7 @@ public class SigAction : Action { /// This signal is emitted on activation. ///////////////////////////////////////////////////////////////////// - public signal void activated(); + public signal void activated(uint32 time_stamp); ///////////////////////////////////////////////////////////////////// /// This may store something useful. @@ -55,8 +55,8 @@ public class SigAction : Action { /// Emits the signal on activation. ///////////////////////////////////////////////////////////////////// - public override void activate() { - this.activated(); + public override void activate(uint32 time_stamp) { + this.activated(time_stamp); } } diff --git a/src/actions/uriAction.vala b/src/actions/uriAction.vala index dfc1029..d0a41b8 100644 --- a/src/actions/uriAction.vala +++ b/src/actions/uriAction.vala @@ -65,7 +65,7 @@ public class UriAction : Action { /// Opens the default application for the URI. ///////////////////////////////////////////////////////////////////// - public override void activate() { + public override void activate(uint32 time_stamp) { try{ GLib.AppInfo.launch_default_for_uri(real_command, null); } catch (Error e) { diff --git a/src/deamon.vala b/src/deamon.vala index ff7e764..a35e666 100644 --- a/src/deamon.vala +++ b/src/deamon.vala @@ -32,11 +32,18 @@ public class Deamon : GLib.Object { public static string version; ///////////////////////////////////////////////////////////////////// + /// Varaibles set by the commend line parser. + ///////////////////////////////////////////////////////////////////// + + public static bool header_bar = false; + public static bool stack_switcher = false; + + ///////////////////////////////////////////////////////////////////// /// The beginning of everything. ///////////////////////////////////////////////////////////////////// public static int main(string[] args) { - version = "0.6.1"; + version = "0.6.2"; Logger.init(); Gtk.init(ref args); @@ -71,6 +78,10 @@ public class Deamon : GLib.Object { "Open the Pie with the given ID", "ID" }, { "reset", 'r', 0, GLib.OptionArg.NONE, out reset, "Reset all options to default values" }, + { "header-bar", 'b', 0, GLib.OptionArg.NONE, out header_bar, + "Uses the new GTK.HeaderBar" }, + { "stack-switcher", 's', 0, GLib.OptionArg.NONE, out stack_switcher, + "Uses the new GTK.StackSwitcher" }, { null } }; @@ -102,24 +113,25 @@ public class Deamon : GLib.Object { Intl.bindtextdomain ("gnomepie", Paths.locales); Intl.textdomain ("gnomepie"); - // init toolkits and static stuff - ActionRegistry.init(); - GroupRegistry.init(); + if (handle_command_line(args, false)) { + + // init toolkits and static stuff + ActionRegistry.init(); + GroupRegistry.init(); - PieManager.init(); - Icon.init(); + PieManager.init(); + Icon.init(); - // launch the indicator - this.indicator = new Indicator(); + // launch the indicator + this.indicator = new Indicator(); - // connect SigHandlers - Posix.signal(Posix.SIGINT, sig_handler); - Posix.signal(Posix.SIGTERM, sig_handler); + // connect SigHandlers + Posix.signal(Posix.SIGINT, sig_handler); + Posix.signal(Posix.SIGTERM, sig_handler); - // finished loading... so run the prog! - message("Started happily..."); + // finished loading... so run the prog! + message("Started happily..."); - if (handle_command_line(args, false)) { Gtk.main(); } }); @@ -143,10 +155,9 @@ public class Deamon : GLib.Object { private bool handle_command_line(string[] args, bool show_preferences) { // create command line options - var context = new GLib.OptionContext(""); - context.set_help_enabled(true); + var context = new GLib.OptionContext(" - the pie menu for linux"); context.add_main_entries(options, null); - context.add_group(Gtk.get_option_group (false)); + context.add_group(Gtk.get_option_group(false)); try { context.parse(ref args); diff --git a/src/gui/aboutWindow.vala b/src/gui/aboutWindow.vala index cf1ce8a..b4d1e5e 100644 --- a/src/gui/aboutWindow.vala +++ b/src/gui/aboutWindow.vala @@ -32,7 +32,8 @@ public class AboutWindow: Gtk.AboutDialog { string[] devs = { "Simon Schneegans <code@simonschneegans.de>", "Gabriel Dubatti <gdubatti@gmail.com>", - "Francesco Piccinno <stack.box@gmail.com>" + "Francesco Piccinno <stack.box@gmail.com>", + "György Balló <ballogyor@gmail.com>" }; string[] artists = { "Simon Schneegans <code@simonschneegans.de>" diff --git a/src/gui/newSliceWindow.vala b/src/gui/newSliceWindow.vala index a17c819..6066e57 100644 --- a/src/gui/newSliceWindow.vala +++ b/src/gui/newSliceWindow.vala @@ -122,6 +122,7 @@ public class NewSliceWindow : GLib.Object { switch (type) { case "bookmarks": case "clipboard": case "devices": case "menu": case "session": case "window_list": + case "workspace_window_list": this.no_options_box.show(); this.set_icon(icon); break; @@ -318,6 +319,7 @@ public class NewSliceWindow : GLib.Object { 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 "workspace_window_list": group = new WorkspaceWindowListGroup(this.current_id); break; case "app": group = new ActionGroup(this.current_id); diff --git a/src/gui/pieList.vala b/src/gui/pieList.vala index 29c0a1e..77f833b 100644 --- a/src/gui/pieList.vala +++ b/src/gui/pieList.vala @@ -28,6 +28,7 @@ class PieList : Gtk.TreeView { ///////////////////////////////////////////////////////////////////// public signal void on_select(string id); + public signal void on_activate(); ///////////////////////////////////////////////////////////////////// /// Stores the data internally. @@ -65,7 +66,7 @@ class PieList : Gtk.TreeView { this.data.set_sort_column_id(DataPos.NAME, Gtk.SortType.ASCENDING); this.set_model(this.data); - this.set_headers_visible(false); + this.set_headers_visible(true); this.set_grid_lines(Gtk.TreeViewGridLines.NONE); this.width_request = 170; this.set_enable_search(false); @@ -73,12 +74,14 @@ class PieList : Gtk.TreeView { this.set_events(Gdk.EventMask.POINTER_MOTION_MASK); var main_column = new Gtk.TreeViewColumn(); + main_column.title = _("Pies"); 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.xpad = 6; name_render.ellipsize = Pango.EllipsizeMode.END; name_render.ellipsize_set = true; main_column.pack_start(name_render, true); @@ -86,7 +89,7 @@ class PieList : Gtk.TreeView { base.append_column(main_column); main_column.add_attribute(icon_render, "pixbuf", DataPos.ICON); - main_column.add_attribute(name_render, "text", DataPos.NAME); + main_column.add_attribute(name_render, "markup", DataPos.NAME); // setup drag'n'drop Gtk.TargetEntry uri_source = {"text/uri-list", 0, 0}; @@ -101,6 +104,10 @@ class PieList : Gtk.TreeView { this.last_hover = 0; }); + this.row_activated.connect(() => { + this.on_activate(); + }); + this.get_selection().changed.connect(() => { Gtk.TreeIter active; if (this.get_selection().get_selected(null, out active)) { @@ -177,7 +184,8 @@ class PieList : Gtk.TreeView { 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.NAME,GLib.Markup.escape_text(pie.name) + "\n" + + "<span font-size='x-small'>" + PieManager.get_accelerator_label_of(pie.id) + "</span>", DataPos.ID, pie.id); } } diff --git a/src/gui/triggerSelectWindow.vala b/src/gui/pieOptionsWindow.vala index 56781b4..2f9cadf 100644 --- a/src/gui/triggerSelectWindow.vala +++ b/src/gui/pieOptionsWindow.vala @@ -23,13 +23,13 @@ namespace GnomePie { /// a mouse based hotkey. ///////////////////////////////////////////////////////////////////////// -public class TriggerSelectWindow : GLib.Object { +public class PieOptionsWindow : GLib.Object { ///////////////////////////////////////////////////////////////////// /// This signal is emitted when the user selects a new hot key. ///////////////////////////////////////////////////////////////////// - public signal void on_ok(Trigger trigger); + public signal void on_ok(Trigger trigger, string pie_name, string icon_name); ///////////////////////////////////////////////////////////////////// /// Some private members which are needed by other methods. @@ -41,7 +41,13 @@ public class TriggerSelectWindow : GLib.Object { private Gtk.CheckButton centered; private Gtk.CheckButton warp; private Gtk.RadioButton rshape[10]; - private TriggerSelectButton button; + private TriggerSelectButton trigger_button; + private Gtk.Entry name_entry = null; + private Gtk.Button? icon_button = null; + private Gtk.Image? icon = null; + private Gtk.Label? pie_id = null; + + private IconSelectWindow? icon_window = null; ///////////////////////////////////////////////////////////////////// /// The currently configured trigger. @@ -58,39 +64,53 @@ public class TriggerSelectWindow : GLib.Object { private Trigger original_trigger = null; ///////////////////////////////////////////////////////////////////// + /// Stores the current icon name of the pie. + ///////////////////////////////////////////////////////////////////// + + private string icon_name = ""; + + ///////////////////////////////////////////////////////////////////// + /// Stores the id of the current pie. + ///////////////////////////////////////////////////////////////////// + + private string id = ""; + + ///////////////////////////////////////////////////////////////////// /// Radioboxes call toggled() twice per selection change. /// This flag is used to discard one of the two notifications. ///////////////////////////////////////////////////////////////////// - private static int notify_toggle= 0; + private static int notify_toggle = 0; ///////////////////////////////////////////////////////////////////// - /// C'tor, constructs a new TriggerSelectWindow. + /// C'tor, constructs a new PieOptionsWindow. ///////////////////////////////////////////////////////////////////// - public TriggerSelectWindow() { + public PieOptionsWindow() { try { Gtk.Builder builder = new Gtk.Builder(); - builder.add_from_file (Paths.ui_files + "/trigger_select.ui"); + builder.add_from_file (Paths.ui_files + "/pie_options.ui"); this.window = builder.get_object("window") as Gtk.Dialog; - this.button = new TriggerSelectButton(true); - this.button.show(); - - this.button.on_select.connect((trigger) => { - this.trigger = new Trigger.from_values(trigger.key_sym, - trigger.modifiers, - trigger.with_mouse, - this.turbo.active, - this.delayed.active, - this.centered.active, - this.warp.active, - this.get_radio_shape()); + this.trigger_button = new TriggerSelectButton(true); + this.trigger_button.show(); + + this.trigger_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, + this.warp.active, + this.get_radio_shape() + ); }); - (builder.get_object("trigger-box") as Gtk.Box).pack_start(this.button, true, true); + (builder.get_object("trigger-box") as Gtk.Box).pack_start(this.trigger_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); @@ -112,6 +132,15 @@ public class TriggerSelectWindow : GLib.Object { this.rshape[i].toggled.connect(this.on_radio_toggled); } + this.name_entry = builder.get_object("name-entry") as Gtk.Entry; + this.name_entry.activate.connect(this.on_ok_button_clicked); + + this.pie_id = builder.get_object("pie-id") as Gtk.Label; + + this.icon = builder.get_object("icon") as Gtk.Image; + this.icon_button = builder.get_object("icon-button") as Gtk.Button; + this.icon_button.clicked.connect(on_icon_button_clicked); + this.window.delete_event.connect(this.window.hide_on_delete); } catch (GLib.Error e) { @@ -143,6 +172,9 @@ public class TriggerSelectWindow : GLib.Object { public void set_pie(string id) { var trigger = new Trigger.from_string(PieManager.get_accelerator_of(id)); + var pie = PieManager.all_pies[id]; + + this.id = id; this.turbo.active = trigger.turbo; this.delayed.active = trigger.delayed; @@ -151,8 +183,10 @@ public class TriggerSelectWindow : GLib.Object { this.set_radio_shape( trigger.shape ); this.original_trigger = trigger; this.trigger = trigger; - - this.button.set_trigger(trigger); + this.name_entry.text = PieManager.get_name_of(id); + this.pie_id.label = "Pie-ID: " + id; + this.trigger_button.set_trigger(trigger); + this.set_icon(pie.icon); } ///////////////////////////////////////////////////////////////////// @@ -160,12 +194,15 @@ public class TriggerSelectWindow : GLib.Object { ///////////////////////////////////////////////////////////////////// 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, - this.warp.active, - this.get_radio_shape()); + 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, + this.warp.active, + this.get_radio_shape() + ); + } } ///////////////////////////////////////////////////////////////////// @@ -178,9 +215,11 @@ public class TriggerSelectWindow : GLib.Object { private int get_radio_shape() { int rs; - for (rs= 0; rs < 10; rs++) - if (this.rshape[rs].active) + for (rs= 0; rs < 10; rs++) { + if (this.rshape[rs].active) { break; + } + } return rs; } @@ -190,8 +229,9 @@ public class TriggerSelectWindow : GLib.Object { ///////////////////////////////////////////////////////////////////// private void set_radio_shape(int rs) { - if (rs < 0 || rs > 9) + if (rs < 0 || rs > 9) { rs= 5; //replace invalid value with default= full pie + } this.rshape[rs].active= true; } @@ -201,8 +241,25 @@ public class TriggerSelectWindow : GLib.Object { private void on_radio_toggled() { notify_toggle= 1 - notify_toggle; - if (notify_toggle == 1) + if (notify_toggle == 1) { on_check_toggled(); //just call once + } + } + + ///////////////////////////////////////////////////////////////////// + /// 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) => { + set_icon(icon); + }); + } + + this.icon_window.show(); + this.icon_window.set_icon(this.icon_name); } ///////////////////////////////////////////////////////////////////// @@ -212,16 +269,7 @@ public class TriggerSelectWindow : GLib.Object { 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 != "") { + if (assigned_id != "" && assigned_id != this.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)); @@ -231,12 +279,31 @@ public class TriggerSelectWindow : GLib.Object { dialog.destroy(); } else { // a unused hot key has been chosen, great! - this.on_ok(this.trigger); + this.on_ok(this.trigger, this.name_entry.text, this.icon_name); this.window.hide(); } } ///////////////////////////////////////////////////////////////////// + /// Sets the icon of the icon_button + ///////////////////////////////////////////////////////////////////// + + private void set_icon(string name) { + this.icon_name = name; + + if (name.contains("/")) { + try { + this.icon.pixbuf = new Gdk.Pixbuf.from_file_at_scale(name, + this.icon.get_pixel_size(), this.icon.get_pixel_size(), true); + } catch (GLib.Error error) { + warning(error.message); + } + } else { + this.icon.icon_name = name; + } + } + + ///////////////////////////////////////////////////////////////////// /// Called when the cancel button is pressed. ///////////////////////////////////////////////////////////////////// diff --git a/src/gui/piePreviewAddSign.vala b/src/gui/piePreviewAddSign.vala index fb5e9fa..4a92067 100644 --- a/src/gui/piePreviewAddSign.vala +++ b/src/gui/piePreviewAddSign.vala @@ -87,7 +87,7 @@ public class PiePreviewAddSign : GLib.Object { ///////////////////////////////////////////////////////////////////// public void load() { - this.icon = new Icon("add", 36); + this.icon = new Icon("list-add", 36); } ///////////////////////////////////////////////////////////////////// diff --git a/src/gui/piePreviewDeleteSign.vala b/src/gui/piePreviewDeleteSign.vala index 6ba4dcb..a830002 100644 --- a/src/gui/piePreviewDeleteSign.vala +++ b/src/gui/piePreviewDeleteSign.vala @@ -85,7 +85,7 @@ public class PiePreviewDeleteSign : GLib.Object { ///////////////////////////////////////////////////////////////////// public void load() { - this.icon = new Icon("stock_delete", PiePreviewDeleteSign.radius*2); + this.icon = new Icon("edit-delete", PiePreviewDeleteSign.radius*2); } ///////////////////////////////////////////////////////////////////// diff --git a/src/gui/preferencesWindow.vala b/src/gui/preferencesWindow.vala index 29b5250..a1dacac 100644 --- a/src/gui/preferencesWindow.vala +++ b/src/gui/preferencesWindow.vala @@ -33,19 +33,21 @@ public class PreferencesWindow : GLib.Object { /// Some Gtk widgets used by this window. ///////////////////////////////////////////////////////////////////// + private Gtk.Stack? stack = null; + private Gtk.Notebook? notebook = null; + 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.Box? 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; + private Gtk.Button? remove_pie_button = null; + private Gtk.Button? edit_pie_button = null; + + private ThemeList? theme_list = null; + private Gtk.ToggleButton? indicator = null; + private Gtk.ToggleButton? autostart = null; + private Gtk.ToggleButton? captions = null; ///////////////////////////////////////////////////////////////////// /// Some custom widgets and dialogs used by this window. @@ -53,10 +55,7 @@ public class PreferencesWindow : GLib.Object { 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; + private PieOptionsWindow? pie_options_window = null; ///////////////////////////////////////////////////////////////////// /// C'tor, creates the window. @@ -71,14 +70,49 @@ public class PreferencesWindow : GLib.Object { Gdk.EventMask.KEY_PRESS_MASK | Gdk.EventMask.POINTER_MOTION_MASK); - var toolbar = builder.get_object ("toolbar") as Gtk.Widget; - toolbar.get_style_context().add_class("primary-toolbar"); + if (Deamon.header_bar) { + var headerbar = new Gtk.HeaderBar(); + headerbar.show_close_button = true; + headerbar.title = _("Gnome-Pie Settings"); + headerbar.subtitle = _("bake your pies!"); + window.set_titlebar(headerbar); + } + + this.notebook = builder.get_object("notebook") as Gtk.Notebook; + + if (Deamon.stack_switcher) { + var main_box = builder.get_object("main-box") as Gtk.Box; + var pie_settings = builder.get_object("pie-settings") as Gtk.Box; + var general_settings = builder.get_object("general-settings") as Gtk.Box; - var inline_toolbar = builder.get_object ("pies-toolbar") as Gtk.Widget; - inline_toolbar.get_style_context().add_class("inline-toolbar"); + pie_settings.parent.remove(pie_settings); + general_settings.parent.remove(general_settings); + + main_box.remove(this.notebook); + + Gtk.StackSwitcher switcher = new Gtk.StackSwitcher(); + switcher.margin_top = 10; + switcher.set_halign(Gtk.Align.CENTER); + main_box.pack_start(switcher, false, true, 0); + + this.stack = new Gtk.Stack(); + this.stack.transition_duration = 500; + this.stack.transition_type = Gtk.StackTransitionType.SLIDE_LEFT_RIGHT; + this.stack.homogeneous = true; + this.stack.halign = Gtk.Align.FILL; + this.stack.expand = true; + main_box.add(stack); + switcher.set_stack(stack); + + this.stack.add_with_properties(general_settings, "name", "1", "title", _("General Settings"), null); + this.stack.add_with_properties(pie_settings, "name", "2", "title", _("Pie Settings"), null); + } this.pie_list = new PieList(); this.pie_list.on_select.connect(this.on_pie_select); + this.pie_list.on_activate.connect(() => { + this.on_edit_pie_button_clicked(); + }); var scroll_area = builder.get_object("pies-scrolledwindow") as Gtk.ScrolledWindow; scroll_area.add(this.pie_list); @@ -94,29 +128,82 @@ public class PreferencesWindow : GLib.Object { preview_box = builder.get_object("preview-box") as Gtk.Box; 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.remove_pie_button = builder.get_object("remove-pie-button") as Gtk.Button; + this.remove_pie_button.clicked.connect(on_remove_pie_button_clicked); - this.hotkey_button = builder.get_object("key-button") as Gtk.Button; - this.hotkey_button.clicked.connect(on_key_button_clicked); + this.edit_pie_button = builder.get_object("edit-pie-button") as Gtk.Button; + this.edit_pie_button.clicked.connect(on_edit_pie_button_clicked); - this.icon_button = builder.get_object("icon-button") as Gtk.Button; - this.icon_button.clicked.connect(on_icon_button_clicked); + (builder.get_object("add-pie-button") as Gtk.Button).clicked.connect(on_add_pie_button_clicked); - this.name_button = builder.get_object("rename-button") as Gtk.Button; - this.name_button.clicked.connect(on_rename_button_clicked); + this.theme_list = new ThemeList(); + this.theme_list.on_select_new.connect(() => { + this.captions.active = Config.global.show_captions; + if (Config.global.theme.has_slice_captions) { + this.captions.sensitive = true; + } else { + this.captions.sensitive = false; + } + }); - this.remove_pie_button = builder.get_object("remove-pie-button") as Gtk.ToolButton; - this.remove_pie_button.clicked.connect(on_remove_pie_button_clicked); + scroll_area = builder.get_object("theme-scrolledwindow") as Gtk.ScrolledWindow; + scroll_area.add(this.theme_list); + + this.autostart = (builder.get_object("autostart-checkbox") as Gtk.ToggleButton); + this.autostart.toggled.connect(on_autostart_toggled); + + this.indicator = (builder.get_object("indicator-checkbox") as Gtk.ToggleButton); + this.indicator.toggled.connect(on_indicator_toggled); + + this.captions = (builder.get_object("captions-checkbox") as Gtk.ToggleButton); + this.captions.toggled.connect(on_captions_toggled); + + var scale_slider = (builder.get_object("scale-hscale") as Gtk.Scale); + 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; + } + }); - (builder.get_object("add-pie-button") as Gtk.ToolButton).clicked.connect(on_add_pie_button_clicked); + var range_slider = (builder.get_object("range-hscale") as Gtk.Scale); + range_slider.set_range(0, 2000); + range_slider.set_increments(10, 100); + range_slider.set_value(Config.global.activation_range); + range_slider.value_changed.connect(() => { + Config.global.activation_range = (int)range_slider.get_value(); + }); + + var range_slices = (builder.get_object("range-slices") as Gtk.Scale); + range_slices.set_range(12, 96); + range_slices.set_increments(4, 12); + range_slices.set_value(Config.global.max_visible_slices); + range_slices.value_changed.connect(() => { + Config.global.max_visible_slices = (int)range_slices.get_value(); + }); this.window.hide.connect(() => { // save settings on close @@ -143,6 +230,85 @@ public class PreferencesWindow : GLib.Object { var style = this.preview_background.get_style_context(); this.preview_background.override_background_color(Gtk.StateFlags.NORMAL, style.get_background_color(Gtk.StateFlags.NORMAL)); + + this.indicator.active = Config.global.show_indicator; + this.autostart.active = Config.global.auto_start; + this.captions.active = Config.global.show_captions; + + if (Config.global.theme.has_slice_captions) { + this.captions.sensitive = true; + } else { + this.captions.sensitive = false; + } + + if (Deamon.stack_switcher) { + this.stack.set_visible_child_full("2", Gtk.StackTransitionType.NONE); + } else { + this.notebook.set_current_page(1); + } + this.pie_list.has_focus = true; + } + + ///////////////////////////////////////////////////////////////////// + /// Creates or deletes the autostart file. This code is inspired + /// by project synapse as well. + ///////////////////////////////////////////////////////////////////// + + private void on_autostart_toggled(Gtk.ToggleButton check_box) { + + bool active = check_box.active; + if (!active && FileUtils.test(Paths.autostart, FileTest.EXISTS)) { + Config.global.auto_start = false; + // delete the autostart file + FileUtils.remove (Paths.autostart); + } + else if (active && !FileUtils.test(Paths.autostart, FileTest.EXISTS)) { + Config.global.auto_start = true; + + string autostart_entry = + "#!/usr/bin/env xdg-open\n" + + "[Desktop Entry]\n" + + "Name=Gnome-Pie\n" + + "Exec=" + Paths.executable + "\n" + + "Encoding=UTF-8\n" + + "Type=Application\n" + + "X-GNOME-Autostart-enabled=true\n" + + "Icon=gnome-pie\n"; + + // create the autostart file + string autostart_dir = GLib.Path.get_dirname(Paths.autostart); + if (!FileUtils.test(autostart_dir, FileTest.EXISTS | FileTest.IS_DIR)) { + DirUtils.create_with_parents(autostart_dir, 0755); + } + + try { + FileUtils.set_contents(Paths.autostart, autostart_entry); + FileUtils.chmod(Paths.autostart, 0755); + } catch (Error e) { + var d = new Gtk.MessageDialog (this.window, 0, Gtk.MessageType.ERROR, Gtk.ButtonsType.CLOSE, + "%s", e.message); + d.run (); + d.destroy (); + } + } + } + + ///////////////////////////////////////////////////////////////////// + /// Shows or hides the indicator. + ///////////////////////////////////////////////////////////////////// + + private void on_indicator_toggled(Gtk.ToggleButton check_box) { + var check = check_box as Gtk.CheckButton; + Config.global.show_indicator = check.active; + } + + ///////////////////////////////////////////////////////////////////// + /// Shows or hides the captions of Slices. + ///////////////////////////////////////////////////////////////////// + + private void on_captions_toggled(Gtk.ToggleButton check_box) { + var check = check_box as Gtk.CheckButton; + Config.global.show_captions = check.active; } ///////////////////////////////////////////////////////////////////// @@ -156,33 +322,13 @@ public class PreferencesWindow : GLib.Object { 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; + this.edit_pie_button.sensitive = false; if (id == "") { - this.id_label.label = ""; - this.name_label.label = _("No Pie selected."); - this.hotkey_label.set_markup(""); - this.icon.icon_name = "stock_unknown"; - this.no_pie_label.show(); } else { var pie = PieManager.all_pies[selected_id]; - this.id_label.label = ("ID: %s").printf(pie.id); - this.name_label.label = PieManager.get_name_of(pie.id); - this.hotkey_label.set_markup(PieManager.get_accelerator_label_of(pie.id)); - - if (pie.icon.contains("/")) - try { - this.icon.pixbuf = new Gdk.Pixbuf.from_file_at_scale(pie.icon, - this.icon.get_pixel_size(), this.icon.get_pixel_size(), true); - } catch (GLib.Error error) { - warning(error.message); - } - else - this.icon.icon_name = pie.icon; this.preview.set_pie(id); this.preview_box.show(); @@ -191,10 +337,8 @@ public class PreferencesWindow : GLib.Object { 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; + this.edit_pie_button.sensitive = true; } } @@ -202,17 +346,19 @@ public class PreferencesWindow : GLib.Object { /// Called when the add Pie button is clicked. ///////////////////////////////////////////////////////////////////// - private void on_add_pie_button_clicked(Gtk.ToolButton button) { + private void on_add_pie_button_clicked(Gtk.Button button) { var new_pie = PieManager.create_persistent_pie(_("New Pie"), "stock_unknown", null); this.pie_list.reload_all(); this.pie_list.select(new_pie.id); + + this.on_edit_pie_button_clicked(); } ///////////////////////////////////////////////////////////////////// /// Called when the remove Pie button is clicked. ///////////////////////////////////////////////////////////////////// - private void on_remove_pie_button_clicked(Gtk.ToolButton button) { + private void on_remove_pie_button_clicked(Gtk.Button 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, @@ -232,74 +378,25 @@ public class PreferencesWindow : GLib.Object { } ///////////////////////////////////////////////////////////////////// - /// Called when rename Pie button is clicked. + /// Called when the edit 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) => { + private void on_edit_pie_button_clicked(Gtk.Button? button = null) { + if (this.pie_options_window == null) { + this.pie_options_window = new PieOptionsWindow(); + this.pie_options_window.set_parent(window); + this.pie_options_window.on_ok.connect((trigger, name, icon) => { 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.bind_trigger(trigger, selected_id); PieManager.create_launcher(pie.id); this.pie_list.reload_all(); }); } - this.icon_window.show(); - this.icon_window.set_icon(PieManager.all_pies[selected_id].icon); + this.pie_options_window.set_pie(selected_id); + this.pie_options_window.show(); } } diff --git a/src/gui/renameWindow.vala b/src/gui/renameWindow.vala deleted file mode 100644 index de65069..0000000 --- a/src/gui/renameWindow.vala +++ /dev/null @@ -1,109 +0,0 @@ -///////////////////////////////////////////////////////////////////////// -// Copyright (c) 2011-2015 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 deleted file mode 100644 index 6bb10c1..0000000 --- a/src/gui/settingsWindow.vala +++ /dev/null @@ -1,222 +0,0 @@ -///////////////////////////////////////////////////////////////////////// -// Copyright (c) 2011-2015 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; - private Gtk.ToggleButton? captions = null; - - ///////////////////////////////////////////////////////////////////// - /// C'tor creates, the dialog. - ///////////////////////////////////////////////////////////////////// - - public SettingsWindow() { - try { - - Gtk.Builder builder = new Gtk.Builder(); - - builder.add_from_file (Paths.ui_files + "/settings.ui"); - - this.window = builder.get_object("window") as Gtk.Dialog; - - this.theme_list = new ThemeList(); - this.theme_list.on_select_new.connect(() => { - this.captions.active = Config.global.show_captions; - if (Config.global.theme.has_slice_captions) { - this.captions.sensitive = true; - } else { - this.captions.sensitive = false; - } - }); - - var scroll_area = builder.get_object("theme-scrolledwindow") as Gtk.ScrolledWindow; - scroll_area.add(this.theme_list); - - (builder.get_object("close-button") as Gtk.Button).clicked.connect(on_close_button_clicked); - - this.autostart = (builder.get_object("autostart-checkbox") as Gtk.ToggleButton); - this.autostart.toggled.connect(on_autostart_toggled); - - this.indicator = (builder.get_object("indicator-checkbox") as Gtk.ToggleButton); - this.indicator.toggled.connect(on_indicator_toggled); - - this.captions = (builder.get_object("captions-checkbox") as Gtk.ToggleButton); - this.captions.toggled.connect(on_captions_toggled); - - var scale_slider = (builder.get_object("scale-hscale") as Gtk.Scale); - 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; - } - }); - - var range_slider = (builder.get_object("range-hscale") as Gtk.Scale); - range_slider.set_range(0, 2000); - range_slider.set_increments(10, 100); - range_slider.set_value(Config.global.activation_range); - range_slider.value_changed.connect(() => { - Config.global.activation_range = (int)range_slider.get_value(); - }); - - var range_slices = (builder.get_object("range-slices") as Gtk.Scale); - range_slices.set_range(12, 96); - range_slices.set_increments(4, 12); - range_slices.set_value(Config.global.max_visible_slices); - range_slices.value_changed.connect(() => { - Config.global.max_visible_slices = (int)range_slices.get_value(); - }); - - this.window.delete_event.connect(this.window.hide_on_delete); - - } catch (GLib.Error e) { - error("Could not load UI: %s\n", e.message); - } - } - - ///////////////////////////////////////////////////////////////////// - /// Sets the parent window, in order to make this window stay in - /// front. - ///////////////////////////////////////////////////////////////////// - - public void set_parent(Gtk.Window parent) { - this.window.set_transient_for(parent); - } - - ///////////////////////////////////////////////////////////////////// - /// Displays the window on the screen. - ///////////////////////////////////////////////////////////////////// - - public void show() { - this.indicator.active = Config.global.show_indicator; - this.autostart.active = Config.global.auto_start; - this.captions.active = Config.global.show_captions; - - if (Config.global.theme.has_slice_captions) { - this.captions.sensitive = true; - } else { - this.captions.sensitive = false; - } - - this.window.show_all(); - } - - ///////////////////////////////////////////////////////////////////// - /// Called when the close button is clicked. - ///////////////////////////////////////////////////////////////////// - - private void on_close_button_clicked() { - this.window.hide(); - } - - ///////////////////////////////////////////////////////////////////// - /// Creates or deletes the autostart file. This code is inspired - /// by project synapse as well. - ///////////////////////////////////////////////////////////////////// - - private void on_autostart_toggled(Gtk.ToggleButton check_box) { - - bool active = check_box.active; - if (!active && FileUtils.test(Paths.autostart, FileTest.EXISTS)) { - Config.global.auto_start = false; - // delete the autostart file - FileUtils.remove (Paths.autostart); - } - else if (active && !FileUtils.test(Paths.autostart, FileTest.EXISTS)) { - Config.global.auto_start = true; - - string autostart_entry = - "#!/usr/bin/env xdg-open\n" + - "[Desktop Entry]\n" + - "Name=Gnome-Pie\n" + - "Exec=" + Paths.executable + "\n" + - "Encoding=UTF-8\n" + - "Type=Application\n" + - "X-GNOME-Autostart-enabled=true\n" + - "Icon=gnome-pie\n"; - - // create the autostart file - string autostart_dir = GLib.Path.get_dirname(Paths.autostart); - if (!FileUtils.test(autostart_dir, FileTest.EXISTS | FileTest.IS_DIR)) { - DirUtils.create_with_parents(autostart_dir, 0755); - } - - try { - FileUtils.set_contents(Paths.autostart, autostart_entry); - FileUtils.chmod(Paths.autostart, 0755); - } catch (Error e) { - var d = new Gtk.MessageDialog (this.window, 0, Gtk.MessageType.ERROR, Gtk.ButtonsType.CLOSE, - "%s", e.message); - d.run (); - d.destroy (); - } - } - } - - ///////////////////////////////////////////////////////////////////// - /// Shows or hides the indicator. - ///////////////////////////////////////////////////////////////////// - - private void on_indicator_toggled(Gtk.ToggleButton check_box) { - var check = check_box as Gtk.CheckButton; - Config.global.show_indicator = check.active; - } - - ///////////////////////////////////////////////////////////////////// - /// Shows or hides the captions of Slices. - ///////////////////////////////////////////////////////////////////// - - private void on_captions_toggled(Gtk.ToggleButton check_box) { - var check = check_box as Gtk.CheckButton; - Config.global.show_captions = check.active; - } -} - -} diff --git a/src/gui/sliceTypeList.vala b/src/gui/sliceTypeList.vala index e164dea..1a9ecc4 100644 --- a/src/gui/sliceTypeList.vala +++ b/src/gui/sliceTypeList.vala @@ -62,6 +62,7 @@ class SliceTypeList : Gtk.TreeView { main_column.pack_start(icon_render, false); var name_render = new Gtk.CellRendererText(); + name_render.xpad = 6; main_column.pack_start(name_render, true); base.append_column(main_column); @@ -103,8 +104,8 @@ class SliceTypeList : Gtk.TreeView { 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>" + GLib.Markup.escape_text(description.name) + "</b>\n" - + "<small>" + GLib.Markup.escape_text(description.description) + "</small>"); + data.set(current, DataPos.NAME, GLib.Markup.escape_text(description.name) + "\n" + + "<span font-size='x-small'>" + GLib.Markup.escape_text(description.description) + "</span>"); data.set(current, DataPos.ID, description.id); } @@ -116,8 +117,8 @@ class SliceTypeList : Gtk.TreeView { 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>" + GLib.Markup.escape_text(description.name) + "</b>\n" - + "<small>" + GLib.Markup.escape_text(description.description) + "</small>"); + data.set(current, DataPos.NAME, GLib.Markup.escape_text(description.name) + "\n" + + "<span font-size='x-small'>" + GLib.Markup.escape_text(description.description) + "</span>"); data.set(current, DataPos.ID, description.id); } diff --git a/src/gui/themeList.vala b/src/gui/themeList.vala index 4173819..517c6d5 100644 --- a/src/gui/themeList.vala +++ b/src/gui/themeList.vala @@ -62,15 +62,18 @@ class ThemeList : Gtk.TreeView { main_column.title = _("Themes"); main_column.set_sizing(Gtk.TreeViewColumnSizing.FIXED); var icon_render = new Gtk.CellRendererPixbuf(); + icon_render.xpad = 4; + icon_render.ypad = 4; main_column.pack_start(icon_render, false); - var theme_render = new Gtk.CellRendererText(); - main_column.pack_start(theme_render, true); + var name_render = new Gtk.CellRendererText(); + name_render.xpad = 6; + main_column.pack_start(name_render, true); this.append_column(main_column); main_column.add_attribute(icon_render, "pixbuf", DataPos.ICON); - main_column.add_attribute(theme_render, "markup", DataPos.NAME); + main_column.add_attribute(name_render, "markup", DataPos.NAME); this.get_selection().changed.connect(() => { Gtk.TreeIter active; @@ -94,10 +97,10 @@ class ThemeList : Gtk.TreeView { Gtk.TreeIter current; data.append(out current); data.set(current, DataPos.ICON, theme.preview_icon.to_pixbuf()); - data.set(current, DataPos.NAME, "<b>"+GLib.Markup.escape_text(theme.name)+"</b><small> - " - +GLib.Markup.escape_text(theme.description)+"\n" - +"<i>"+GLib.Markup.escape_text(_("By")+" "+theme.author) - +"</i></small>"); + data.set(current, DataPos.NAME, GLib.Markup.escape_text(theme.name)+"\n" + + "<span font-size='x-small'>" + GLib.Markup.escape_text(theme.description) + + " - <i>"+GLib.Markup.escape_text(_("By")+" "+theme.author) + + "</i></span>"); if(theme == Config.global.theme) get_selection().select_iter(current); } diff --git a/src/gui/triggerSelectButton.vala b/src/gui/triggerSelectButton.vala index 92cd8a3..eb34066 100644 --- a/src/gui/triggerSelectButton.vala +++ b/src/gui/triggerSelectButton.vala @@ -48,9 +48,9 @@ public class TriggerSelectButton : Gtk.ToggleButton { ///////////////////////////////////////////////////////////////////// private Gdk.ModifierType lock_modifiers = Gdk.ModifierType.MOD2_MASK - |Gdk.ModifierType.SUPER_MASK - |Gdk.ModifierType.LOCK_MASK - |Gdk.ModifierType.MOD5_MASK; + |Gdk.ModifierType.MOD4_MASK + |Gdk.ModifierType.MOD5_MASK + |Gdk.ModifierType.LOCK_MASK; ///////////////////////////////////////////////////////////////////// /// C'tor, constructs a new TriggerSelectWindow. diff --git a/src/pies/defaultConfig.vala b/src/pies/defaultConfig.vala index 6ca45e4..e446c2b 100644 --- a/src/pies/defaultConfig.vala +++ b/src/pies/defaultConfig.vala @@ -26,11 +26,11 @@ namespace Pies { public void create_default_config() { // add a pie with playback controls - var multimedia = PieManager.create_persistent_pie(_("Multimedia"), "stock_media-play", new Trigger.from_string("<Control><Alt>m")); - multimedia.add_action(new KeyAction(_("Next Track"), "stock_media-next", "XF86AudioNext", true)); - multimedia.add_action(new KeyAction(_("Stop"), "stock_media-stop", "XF86AudioStop")); - multimedia.add_action(new KeyAction(_("Previous Track"), "stock_media-prev", "XF86AudioPrev")); - multimedia.add_action(new KeyAction(_("Play/Pause"), "stock_media-play", "XF86AudioPlay")); + var multimedia = PieManager.create_persistent_pie(_("Multimedia"), "media-playback-start", new Trigger.from_string("<Control><Alt>m")); + multimedia.add_action(new KeyAction(_("Next Track"), "media-skip-forward", "XF86AudioNext", true)); + multimedia.add_action(new KeyAction(_("Stop"), "media-playback-stop", "XF86AudioStop")); + multimedia.add_action(new KeyAction(_("Previous Track"), "media-skip-backward", "XF86AudioPrev")); + multimedia.add_action(new KeyAction(_("Play/Pause"), "media-playback-start", "XF86AudioPlay")); // add a pie with the users default applications var apps = PieManager.create_persistent_pie(_("Applications"), "applications-accessories", new Trigger.from_string("<Control><Alt>a")); @@ -47,20 +47,20 @@ namespace Pies { bookmarks.add_group(new DevicesGroup(bookmarks.id)); // add a pie with session controls - var session = PieManager.create_persistent_pie(_("Session"), "gnome-session-halt", new Trigger.from_string("<Control><Alt>q")); + var session = PieManager.create_persistent_pie(_("Session"), "system-log-out", new Trigger.from_string("<Control><Alt>q")); session.add_group(new SessionGroup(session.id)); // add a pie with a main menu - var menu = PieManager.create_persistent_pie(_("Main Menu"), "alacarte", new Trigger.from_string("<Control><Alt>space")); + var menu = PieManager.create_persistent_pie(_("Main Menu"), "start-here", new Trigger.from_string("<Control><Alt>space")); menu.add_group(new MenuGroup(menu.id)); // add a pie with window controls - var window = PieManager.create_persistent_pie(_("Window"), "gnome-window-manager", new Trigger.from_string("<Control><Alt>w")); - window.add_action(new KeyAction(_("Scale"), "top", "<Control><Alt>s")); - window.add_action(new KeyAction(_("Minimize"), "bottom", "<Alt>F9", true)); + var window = PieManager.create_persistent_pie(_("Window"), "preferences-system-windows", new Trigger.from_string("<Control><Alt>w")); + window.add_action(new KeyAction(_("Scale"), "go-top", "<Control><Alt>s")); + window.add_action(new KeyAction(_("Minimize"), "go-bottom", "<Alt>F9", true)); window.add_action(new KeyAction(_("Close"), "window-close", "<Alt>F4")); - window.add_action(new KeyAction(_("Maximize"), "window_fullscreen", "<Alt>F10")); - window.add_action(new KeyAction(_("Restore"), "window_nofullscreen", "<Alt>F5")); + window.add_action(new KeyAction(_("Maximize"), "view-fullscreen", "<Alt>F10")); + window.add_action(new KeyAction(_("Restore"), "view-restore", "<Alt>F5")); // save the configuration to file Pies.save(); diff --git a/src/renderers/pieRenderer.vala b/src/renderers/pieRenderer.vala index 2edee09..cd50644 100644 --- a/src/renderers/pieRenderer.vala +++ b/src/renderers/pieRenderer.vala @@ -422,10 +422,10 @@ public class PieRenderer : GLib.Object { /// Activates the currently active slice. ///////////////////////////////////////////////////////////////////// - public void activate() { + public void activate(uint32 time_stamp) { if (this.active_slice >= this.first_slice_idx && this.active_slice < this.first_slice_idx+this.visible_slice_count) { - slices[active_slice].activate(); + slices[active_slice].activate(time_stamp); } //foreach (var slice in this.slices) diff --git a/src/renderers/pieWindow.vala b/src/renderers/pieWindow.vala index c8ff455..95432c5 100755 --- a/src/renderers/pieWindow.vala +++ b/src/renderers/pieWindow.vala @@ -130,7 +130,7 @@ public class PieWindow : Gtk.Window { // activate on left click this.button_release_event.connect ((e) => { - if (e.button == 1 || PieManager.get_is_turbo(this.renderer.id)) this.activate_slice(); + if (e.button == 1 || PieManager.get_is_turbo(this.renderer.id)) this.activate_slice(e.time); return true; }); @@ -145,7 +145,7 @@ public class PieWindow : Gtk.Window { this.key_press_event.connect((e) => { if (e.keyval != last_key) { last_key = e.keyval; - this.handle_key_press(e.keyval); + this.handle_key_press(e.keyval, e.time); } return true; }); @@ -154,7 +154,7 @@ public class PieWindow : Gtk.Window { this.key_release_event.connect((e) => { last_key = 0; if (PieManager.get_is_turbo(this.renderer.id)) - this.activate_slice(); + this.activate_slice(e.time); else this.handle_key_release(e.keyval); return true; @@ -373,7 +373,7 @@ public class PieWindow : Gtk.Window { /// Activates the currently activate slice. ///////////////////////////////////////////////////////////////////// - private void activate_slice() { + private void activate_slice(uint32 time_stamp) { if (!this.closing) { this.closing = true; this.on_closing(); @@ -381,7 +381,7 @@ public class PieWindow : Gtk.Window { FocusGrabber.ungrab(); GLib.Timeout.add(10, () => { - this.renderer.activate(); + this.renderer.activate(time_stamp); return false; }); @@ -429,9 +429,9 @@ public class PieWindow : Gtk.Window { /// Do some useful stuff when keys are pressed. ///////////////////////////////////////////////////////////////////// - private void handle_key_press(uint key) { + private void handle_key_press(uint key, uint32 time_stamp) { if (Gdk.keyval_name(key) == "Escape") this.cancel(); - else if (Gdk.keyval_name(key) == "Return") this.activate_slice(); + else if (Gdk.keyval_name(key) == "Return") this.activate_slice(time_stamp); else if (!PieManager.get_is_turbo(this.renderer.id)) { if (Gdk.keyval_name(key) == "Up") this.renderer.select_up(); else if (Gdk.keyval_name(key) == "Down") this.renderer.select_down(); @@ -455,7 +455,7 @@ public class PieWindow : Gtk.Window { if (this.renderer.active_slice == index) { GLib.Timeout.add((uint)(Config.global.theme.transition_time*1000.0), ()=> { - this.activate_slice(); + this.activate_slice(time_stamp); return false; }); } diff --git a/src/renderers/sliceRenderer.vala b/src/renderers/sliceRenderer.vala index 862e2a5..dfcf512 100644 --- a/src/renderers/sliceRenderer.vala +++ b/src/renderers/sliceRenderer.vala @@ -157,8 +157,8 @@ public class SliceRenderer : GLib.Object { /// Activates the Action of this slice. ///////////////////////////////////////////////////////////////////// - public void activate() { - action.activate(); + public void activate(uint32 time_stamp) { + action.activate(time_stamp); } ///////////////////////////////////////////////////////////////////// diff --git a/src/utilities/bindingManager.vala b/src/utilities/bindingManager.vala index e90fa74..6ca73cf 100644 --- a/src/utilities/bindingManager.vala +++ b/src/utilities/bindingManager.vala @@ -99,18 +99,22 @@ public class BindingManager : GLib.Object { public void bind(Trigger trigger, string id) { if (trigger.key_code != 0) { - X.Display display = Gdk.X11.get_default_xdisplay(); + unowned X.Display display = Gdk.X11.get_default_xdisplay(); X.ID xid = Gdk.X11.get_default_root_xwindow(); Gdk.error_trap_push(); + // if bound to super key we need to grab MOD4 instead + // (for whatever reason...) + var modifiers = prepare_modifiers(trigger.modifiers); + foreach(uint lock_modifier in lock_modifiers) { if (trigger.with_mouse) { - display.grab_button(trigger.key_code, trigger.modifiers|lock_modifier, xid, false, + display.grab_button(trigger.key_code, modifiers|lock_modifier, xid, false, X.EventMask.ButtonPressMask | X.EventMask.ButtonReleaseMask, X.GrabMode.Async, X.GrabMode.Async, xid, 0); } else { - display.grab_key(trigger.key_code, trigger.modifiers|lock_modifier, + display.grab_key(trigger.key_code, modifiers|lock_modifier, xid, false, X.GrabMode.Async, X.GrabMode.Async); } } @@ -142,17 +146,22 @@ public class BindingManager : GLib.Object { } } - X.Display display = Gdk.X11.get_default_xdisplay(); + unowned 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) { + + // if bound to super key we need to ungrab MOD4 instead + // (for whatever reason...) + var modifiers = prepare_modifiers(binding.trigger.modifiers); + foreach(uint lock_modifier in lock_modifiers) { if (binding.trigger.with_mouse) { - display.ungrab_button(binding.trigger.key_code, binding.trigger.modifiers|lock_modifier, xid); + display.ungrab_button(binding.trigger.key_code, modifiers|lock_modifier, xid); } else { - display.ungrab_key(binding.trigger.key_code, binding.trigger.modifiers|lock_modifier, xid); + display.ungrab_key(binding.trigger.key_code, modifiers|lock_modifier, xid); } } remove_bindings.add(binding); @@ -282,6 +291,21 @@ public class BindingManager : GLib.Object { } ///////////////////////////////////////////////////////////////////// + /// If SUPER_MASK is set in the input, it will be replaced with + /// MOD4_MASK. For some reason this is required to listen for key + /// presses of the super button.... + ///////////////////////////////////////////////////////////////////// + + private Gdk.ModifierType prepare_modifiers(Gdk.ModifierType mods) { + if ((mods & Gdk.ModifierType.SUPER_MASK) > 0) { + mods |= Gdk.ModifierType.MOD4_MASK; + mods = mods & ~ Gdk.ModifierType.SUPER_MASK; + } + + return mods & ~lock_modifiers[7]; + } + + ///////////////////////////////////////////////////////////////////// /// Event filter method needed to fetch X.Events. ///////////////////////////////////////////////////////////////////// @@ -296,9 +320,14 @@ public class BindingManager : GLib.Object { if(xevent->type == X.EventType.KeyPress) { foreach(var binding in bindings) { + // remove NumLock, CapsLock and ScrollLock from key state - uint event_mods = xevent.xkey.state & ~ (lock_modifiers[7]); - if(xevent->xkey.keycode == binding.trigger.key_code && event_mods == binding.trigger.modifiers) { + var event_mods = prepare_modifiers((Gdk.ModifierType)xevent.xkey.state); + var bound_mods = prepare_modifiers(binding.trigger.modifiers); + + if(xevent->xkey.keycode == binding.trigger.key_code && + event_mods == bound_mods) { + if (binding.trigger.delayed) { this.activate_delayed(binding, *xevent); } else { @@ -309,9 +338,14 @@ public class BindingManager : GLib.Object { } else if(xevent->type == X.EventType.ButtonPress) { foreach(var binding in bindings) { + // remove NumLock, CapsLock and ScrollLock from key state - uint event_mods = xevent.xbutton.state & ~ (lock_modifiers[7]); - if(xevent->xbutton.button == binding.trigger.key_code && event_mods == binding.trigger.modifiers) { + var event_mods = prepare_modifiers((Gdk.ModifierType)xevent.xbutton.state); + var bound_mods = prepare_modifiers(binding.trigger.modifiers); + + if(xevent->xbutton.button == binding.trigger.key_code && + event_mods == bound_mods) { + if (binding.trigger.delayed) { this.activate_delayed(binding, *xevent); } else { @@ -343,27 +377,27 @@ 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 - X.Display display = Gdk.X11.get_default_xdisplay(); + unowned X.Display display = Gdk.X11.get_default_xdisplay(); - // unbind the trigger, else we'll capture that event again ;) - unbind(delayed_binding.id); + // unbind the trigger, else we'll capture that event again ;) + unbind(delayed_binding.id); - if (this.delayed_binding.trigger.with_mouse) { - // simulate mouse click - X.Test.fake_button_event(display, this.delayed_event.xbutton.button, true, 0); - display.flush(); + if (this.delayed_binding.trigger.with_mouse) { + // simulate mouse click + XTest.fake_button_event(display, this.delayed_event.xbutton.button, true, 0); + display.flush(); - X.Test.fake_button_event(display, this.delayed_event.xbutton.button, false, 0); + XTest.fake_button_event(display, this.delayed_event.xbutton.button, false, 0); display.flush(); - } else { - // simulate key press - X.Test.fake_key_event(display, this.delayed_event.xkey.keycode, true, 0); - display.flush(); + } else { + // simulate key press + XTest.fake_key_event(display, this.delayed_event.xkey.keycode, true, 0); + display.flush(); - X.Test.fake_key_event(display, this.delayed_event.xkey.keycode, false, 0); - display.flush(); - } + XTest.fake_key_event(display, this.delayed_event.xkey.keycode, false, 0); + display.flush(); + } // bind it again bind(delayed_binding.trigger, delayed_binding.id); diff --git a/src/utilities/color.vala b/src/utilities/color.vala index 6bb9d06..a681e02 100644 --- a/src/utilities/color.vala +++ b/src/utilities/color.vala @@ -77,6 +77,19 @@ public class Color: GLib.Object { } ///////////////////////////////////////////////////////////////////// + /// Creates a color from a given widget style + ///////////////////////////////////////////////////////////////////// + + public Color.from_widget_style(Gtk.Widget widget, string style_name) { + var ctx = widget.get_style_context(); + Gdk.RGBA color; + if (!ctx.lookup_color(style_name, out color)) { + warning("Failed to get style color for widget style \"" + style_name + "\"!"); + } + Color.from_gdk(color); + } + + ///////////////////////////////////////////////////////////////////// /// Creates a color, parsed from a string, such as #22EE33 ///////////////////////////////////////////////////////////////////// @@ -129,6 +142,14 @@ public class Color: GLib.Object { } ///////////////////////////////////////////////////////////////////// + /// Returns this color as its hex representation. + ///////////////////////////////////////////////////////////////////// + + public string to_hex_string() { + return "#%02X%02X%02X".printf((int)(_r*255), (int)(_g*255), (int)(_b*255)); + } + + ///////////////////////////////////////////////////////////////////// /// The reddish part of the color. ///////////////////////////////////////////////////////////////////// diff --git a/src/utilities/config.vala b/src/utilities/config.vala index abb8b23..dd31885 100644 --- a/src/utilities/config.vala +++ b/src/utilities/config.vala @@ -192,7 +192,7 @@ public class Config : GLib.Object { if (themes.size > 0) { if (current == "") { - current = "Unity"; + current = "Adwaita"; warning("No theme specified! Using default..."); } foreach (var t in themes) { diff --git a/src/utilities/key.vala b/src/utilities/key.vala index 7cf425f..486744d 100644 --- a/src/utilities/key.vala +++ b/src/utilities/key.vala @@ -118,8 +118,8 @@ public class Key : GLib.Object { display.flush(); // press and release the actual key - X.Test.fake_key_event(display, this.key_code, true, 0); - X.Test.fake_key_event(display, this.key_code, false, 0); + XTest.fake_key_event(display, this.key_code, true, 0); + XTest.fake_key_event(display, this.key_code, false, 0); // release the pressed modifiers and re-press the keys hold down by the user press_modifiers(this.modifiers, false); @@ -145,16 +145,16 @@ public class Key : GLib.Object { private void press_modifiers(Gdk.ModifierType modifiers, bool down) { if ((modifiers & Gdk.ModifierType.CONTROL_MASK) > 0) - X.Test.fake_key_event(display, ctrl_code, down, 0); + XTest.fake_key_event(display, ctrl_code, down, 0); if ((modifiers & Gdk.ModifierType.SHIFT_MASK) > 0) - X.Test.fake_key_event(display, shift_code, down, 0); + XTest.fake_key_event(display, shift_code, down, 0); if ((modifiers & Gdk.ModifierType.MOD1_MASK) > 0) - X.Test.fake_key_event(display, alt_code, down, 0); + XTest.fake_key_event(display, alt_code, down, 0); if ((modifiers & Gdk.ModifierType.SUPER_MASK) > 0) - X.Test.fake_key_event(display, super_code, down, 0); + XTest.fake_key_event(display, super_code, down, 0); } } diff --git a/src/utilities/trigger.vala b/src/utilities/trigger.vala index fbd74f8..5373b41 100644 --- a/src/utilities/trigger.vala +++ b/src/utilities/trigger.vala @@ -251,7 +251,7 @@ public class Trigger : GLib.Object { msg += " | " + _("Half pie"); } if (msg != "") - this.label_with_specials += (" <small><span weight='light'>[ " + msg + " ]</span></small>"); + this.label_with_specials += (" [ " + msg + " ]"); } else { this.set_unbound(); diff --git a/vapi/appindicator-0.1.vapi b/vapi/appindicator-0.1.vapi deleted file mode 100644 index b2d3b34..0000000 --- a/vapi/appindicator-0.1.vapi +++ /dev/null @@ -1,94 +0,0 @@ -/* appindicator-0.1.vapi generated by vapigen, do not modify. */ - -[CCode (cprefix = "App", lower_case_cprefix = "app_", gir_namespace = "AppIndicator", gir_version = "0.1")] -namespace AppIndicator { - [CCode (cheader_filename = "libappindicator/app-indicator.h")] - public class Indicator : GLib.Object { - public AppIndicator.IndicatorPrivate priv; - [CCode (has_construct_function = false)] - public Indicator (string id, string icon_name, AppIndicator.IndicatorCategory category); - public void build_menu_from_desktop (string desktop_file, string desktop_profile); - public unowned string get_attention_icon (); - public unowned string get_attention_icon_desc (); - public AppIndicator.IndicatorCategory get_category (); - public unowned string get_icon (); - public unowned string get_icon_desc (); - public unowned string get_icon_theme_path (); - public unowned string get_id (); - public unowned string get_label (); - public unowned string get_label_guide (); - public unowned Gtk.Menu get_menu (); - public uint32 get_ordering_index (); - public unowned Gtk.Widget get_secondary_activate_target (); - public AppIndicator.IndicatorStatus get_status (); - public void set_attention_icon (string icon_name); - public void set_attention_icon_full (string icon_name, string icon_desc); - public void set_icon (string icon_name); - public void set_icon_full (string icon_name, string icon_desc); - public void set_icon_theme_path (string icon_theme_path); - public void set_label (string label, string guide); - public void set_menu (Gtk.Menu? menu); - public void set_ordering_index (uint32 ordering_index); - public void set_secondary_activate_target (Gtk.Widget? menuitem); - public void set_status (AppIndicator.IndicatorStatus status); - [NoWrapper] - public virtual void unfallback (Gtk.StatusIcon status_icon); - [CCode (has_construct_function = false)] - public Indicator.with_path (string id, string icon_name, AppIndicator.IndicatorCategory category, string icon_theme_path); - public string attention_icon_desc { get; set; } - [NoAccessorMethod] - public string attention_icon_name { get; set; } - public string category { get; construct; } - [NoAccessorMethod] - public bool connected { get; } - public string icon_desc { get; set; } - [NoAccessorMethod] - public string icon_name { get; set; } - public string icon_theme_path { get; set construct; } - public string id { get; construct; } - public string label { get; set; } - public string label_guide { get; set; } - public uint ordering_index { get; set; } - public string status { get; set; } - public virtual signal void connection_changed (bool indicator); - public virtual signal void new_attention_icon (); - public virtual signal void new_icon (); - public virtual signal void new_icon_theme_path (string indicator); - public virtual signal void new_label (string indicator, string label); - public virtual signal void new_status (string indicator); - public virtual signal void scroll_event (int indicator, uint delta); - } - [CCode (type_id = "APP_TYPE_INDICATOR_PRIVATE", cheader_filename = "libappindicator/app-indicator.h")] - public struct IndicatorPrivate { - } - [CCode (cprefix = "APP_INDICATOR_CATEGORY_", cheader_filename = "libappindicator/app-indicator.h")] - public enum IndicatorCategory { - APPLICATION_STATUS, - COMMUNICATIONS, - SYSTEM_SERVICES, - HARDWARE, - OTHER - } - [CCode (cprefix = "APP_INDICATOR_STATUS_", cheader_filename = "libappindicator/app-indicator.h")] - public enum IndicatorStatus { - PASSIVE, - ACTIVE, - ATTENTION - } - [CCode (cheader_filename = "libappindicator/app-indicator.h")] - public const string INDICATOR_SHORTY_NICK; - [CCode (cheader_filename = "libappindicator/app-indicator.h")] - public const string INDICATOR_SIGNAL_CONNECTION_CHANGED; - [CCode (cheader_filename = "libappindicator/app-indicator.h")] - public const string INDICATOR_SIGNAL_NEW_ATTENTION_ICON; - [CCode (cheader_filename = "libappindicator/app-indicator.h")] - public const string INDICATOR_SIGNAL_NEW_ICON; - [CCode (cheader_filename = "libappindicator/app-indicator.h")] - public const string INDICATOR_SIGNAL_NEW_ICON_THEME_PATH; - [CCode (cheader_filename = "libappindicator/app-indicator.h")] - public const string INDICATOR_SIGNAL_NEW_LABEL; - [CCode (cheader_filename = "libappindicator/app-indicator.h")] - public const string INDICATOR_SIGNAL_NEW_STATUS; - [CCode (cheader_filename = "libappindicator/app-indicator.h")] - public const string INDICATOR_SIGNAL_SCROLL_EVENT; -} diff --git a/vapi/bamf.vapi b/vapi/bamf.vapi deleted file mode 100644 index 5086435..0000000 --- a/vapi/bamf.vapi +++ /dev/null @@ -1,117 +0,0 @@ -/* bamf.vapi generated by vapigen, do not modify. */ - -[CCode (cprefix = "Bamf", lower_case_cprefix = "bamf_")] -namespace Bamf { - [CCode (type_check_function = "BAMF_IS_APPLICATION", cheader_filename = "libbamf/libbamf.h")] - public class Application : Bamf.View { - [CCode (has_construct_function = false)] - protected Application (); - public unowned string get_application_type (); - public unowned string get_desktop_file (); - public bool get_show_menu_stubs (); - public unowned GLib.List get_windows (); - public unowned GLib.Array get_xids (); - public virtual signal void window_added (Bamf.View p0); - public virtual signal void window_removed (Bamf.View p0); - } - [CCode (type_check_function = "BAMF_IS_CONTROL", cheader_filename = "libbamf/libbamf.h")] - public class Control : GLib.Object { - [CCode (has_construct_function = false)] - protected Control (); - public static unowned Bamf.Control get_default (); - public void insert_desktop_file (string desktop_file); - public void register_application_for_pid (string application, int32 pid); - public void register_tab_provider (string path); - public void set_approver_behavior (int32 behavior); - } - [CCode (type_check_function = "BAMF_IS_INDICATOR", cheader_filename = "libbamf/libbamf.h")] - public class Indicator : Bamf.View { - [CCode (has_construct_function = false)] - protected Indicator (); - public unowned string get_dbus_menu_path (); - public unowned string get_remote_address (); - public unowned string get_remote_path (); - } - [CCode (type_check_function = "BAMF_IS_MATCHER", cheader_filename = "libbamf/libbamf.h")] - public class Matcher : GLib.Object { - [CCode (has_construct_function = false)] - protected Matcher (); - public bool application_is_running (string application); - public unowned Bamf.Application get_active_application (); - public unowned Bamf.Window get_active_window (); - public unowned Bamf.Application get_application_for_window (Bamf.Window window); - public unowned Bamf.Application get_application_for_xid (uint32 xid); - public unowned GLib.List get_applications (); - public static unowned Bamf.Matcher get_default (); - public unowned GLib.List get_running_applications (); - public unowned GLib.List get_tabs (); - public unowned GLib.List get_windows (); - public unowned GLib.Array get_xids_for_application (string application); - public void register_favorites ([CCode (array_length = false)] string[] favorites); - public virtual signal void active_application_changed (GLib.Object p0, GLib.Object p1); - public virtual signal void active_window_changed (GLib.Object p0, GLib.Object p1); - public virtual signal void view_closed (GLib.Object p0); - public virtual signal void view_opened (GLib.Object p0); - } - [CCode (type_check_function = "BAMF_IS_TAB_SOURCE", cheader_filename = "libbamf/libbamf.h")] - public class TabSource : GLib.Object { - [CCode (has_construct_function = false)] - protected TabSource (); - public unowned string get_tab_ids (); - public unowned GLib.Array get_tab_preview (string tab_id); - public unowned string get_tab_uri (string tab_id); - public uint32 get_tab_xid (string tab_id); - public virtual void show_tab (Bamf.TabSource source, string tab_id, GLib.Error error); - public virtual unowned string tab_ids (); - public virtual unowned GLib.Array tab_preview (string tab_id); - public virtual unowned string tab_uri (string tab_id); - public virtual uint32 tab_xid (string tab_id); - public string id { get; set construct; } - public virtual signal void tab_closed (string p0); - public virtual signal void tab_opened (string p0); - public virtual signal void tab_uri_changed (string p0, string p1, string p2); - } - [CCode (type_check_function = "BAMF_IS_VIEW", cheader_filename = "libbamf/libbamf.h")] - public class View : GLib.Object { - [CCode (has_construct_function = false)] - protected View (); - public virtual unowned GLib.List get_children (); - public virtual unowned string get_icon (); - public virtual unowned string get_name (); - public unowned string get_view_type (); - public virtual bool is_active (); - public virtual bool is_running (); - public virtual bool is_urgent (); - public virtual bool is_closed (); - public bool user_visible (); - public virtual unowned string view_type (); - public string path { get; set construct; } - public virtual signal void active_changed (bool active); - public virtual signal void child_added (Bamf.View child); - public virtual signal void child_removed (Bamf.View child); - public virtual signal void closed (); - public virtual signal void running_changed (bool running); - public virtual signal void urgent_changed (bool urgent); - public virtual signal void user_visible_changed (bool user_visible); - } - [CCode (type_check_function = "BAMF_IS_WINDOW", cheader_filename = "libbamf/libbamf.h")] - public class Window : Bamf.View { - [CCode (has_construct_function = false)] - protected Window (); - public unowned Bamf.Window get_transient (); - public Bamf.WindowType get_window_type (); - public uint32 get_xid (); - public ulong last_active (); - } - [CCode (cprefix = "BAMF_WINDOW_", has_type_id = false, cheader_filename = "libbamf/libbamf.h")] - public enum WindowType { - NORMAL, - DESKTOP, - DOCK, - DIALOG, - TOOLBAR, - MENU, - UTILITY, - SPLASHSCREEN - } -} diff --git a/vapi/gee-1.0.vapi b/vapi/gee-1.0.vapi deleted file mode 100644 index fe9ea6c..0000000 --- a/vapi/gee-1.0.vapi +++ /dev/null @@ -1,416 +0,0 @@ -/* gee-1.0.vapi generated by valac-0.12 0.12.1, do not modify. */ - -[CCode (cprefix = "Gee", lower_case_cprefix = "gee_", gir_namespace = "Gee", gir_version = "1.0")] -namespace Gee { - [CCode (cprefix = "GeeFunctions", lower_case_cprefix = "gee_functions_")] - namespace Functions { - [CCode (cheader_filename = "gee.h")] - public static GLib.CompareFunc get_compare_func_for (GLib.Type t); - [CCode (cheader_filename = "gee.h")] - public static GLib.EqualFunc get_equal_func_for (GLib.Type t); - [CCode (cheader_filename = "gee.h")] - public static GLib.HashFunc get_hash_func_for (GLib.Type t); - } - [CCode (cheader_filename = "gee.h")] - public abstract class AbstractCollection<G> : GLib.Object, Gee.Iterable<G>, Gee.Collection<G> { - public AbstractCollection (); - public abstract bool add (G item); - public virtual bool add_all (Gee.Collection<G> collection); - public abstract void clear (); - public abstract bool contains (G item); - public virtual bool contains_all (Gee.Collection<G> collection); - public abstract Gee.Iterator<G> iterator (); - public abstract bool remove (G item); - public virtual bool remove_all (Gee.Collection<G> collection); - public virtual bool retain_all (Gee.Collection<G> collection); - public virtual G[] to_array (); - public virtual bool is_empty { get; } - public virtual Gee.Collection<G> read_only_view { owned get; } - public abstract int size { get; } - } - [CCode (cheader_filename = "gee.h")] - public abstract class AbstractList<G> : Gee.AbstractCollection<G>, Gee.List<G> { - public AbstractList (); - public virtual G first (); - public abstract new G @get (int index); - public abstract int index_of (G item); - public abstract void insert (int index, G item); - public virtual void insert_all (int index, Gee.Collection<G> collection); - public virtual G last (); - public abstract Gee.ListIterator<G> list_iterator (); - public abstract G remove_at (int index); - public abstract new void @set (int index, G item); - public abstract Gee.List<G>? slice (int start, int stop); - public virtual Gee.List<G> read_only_view { owned get; } - } - [CCode (cheader_filename = "gee.h")] - public abstract class AbstractMap<K,V> : GLib.Object, Gee.Iterable<Gee.Map.Entry<K,V>>, Gee.Map<K,V> { - public AbstractMap (); - public abstract void clear (); - public abstract new V @get (K key); - public abstract bool has (K key, V value); - public virtual bool has_all (Gee.Map<K,V> map); - public abstract bool has_key (K key); - public abstract Gee.MapIterator<K,V> map_iterator (); - public abstract new void @set (K key, V value); - public virtual void set_all (Gee.Map<K,V> map); - public abstract bool unset (K key, out V value = null); - public virtual bool unset_all (Gee.Map<K,V> map); - public abstract Gee.Set<Gee.Map.Entry<K,V>> entries { owned get; } - public virtual bool is_empty { get; } - public abstract Gee.Set<K> keys { owned get; } - public virtual Gee.Map<K,V> read_only_view { owned get; } - public abstract int size { get; } - public abstract Gee.Collection<V> values { owned get; } - } - [CCode (cheader_filename = "gee.h")] - public abstract class AbstractMultiMap<K,V> : GLib.Object, Gee.MultiMap<K,V> { - protected Gee.Map<K,Gee.Collection<V>> _storage_map; - public AbstractMultiMap (Gee.Map<K,Gee.Collection<V>> storage_map); - protected abstract Gee.MultiSet<K> create_multi_key_set (); - protected abstract Gee.Collection<V> create_value_storage (); - protected abstract GLib.EqualFunc get_value_equal_func (); - } - [CCode (cheader_filename = "gee.h")] - public abstract class AbstractMultiSet<G> : Gee.AbstractCollection<G>, Gee.MultiSet<G> { - protected Gee.Map<G,int> _storage_map; - public AbstractMultiSet (Gee.Map<G,int> storage_map); - public override bool add (G item); - public override void clear (); - public override bool contains (G item); - public override Gee.Iterator<G> iterator (); - public override bool remove (G item); - public override int size { get; } - } - [CCode (cheader_filename = "gee.h")] - public abstract class AbstractQueue<G> : Gee.AbstractCollection<G>, Gee.Queue<G> { - public AbstractQueue (); - public abstract int drain (Gee.Collection<G> recipient, int amount = -1); - public abstract bool offer (G element); - public abstract G peek (); - public abstract G poll (); - public abstract int capacity { get; } - public abstract bool is_full { get; } - public abstract int remaining_capacity { get; } - } - [CCode (cheader_filename = "gee.h")] - public abstract class AbstractSet<G> : Gee.AbstractCollection<G>, Gee.Set<G> { - public AbstractSet (); - public virtual Gee.Set<G> read_only_view { owned get; } - } - [CCode (cheader_filename = "gee.h")] - public class ArrayList<G> : Gee.AbstractList<G> { - public ArrayList (GLib.EqualFunc? equal_func = null); - public override bool add (G item); - public override bool add_all (Gee.Collection<G> collection); - public override void clear (); - public override bool contains (G item); - public override G @get (int index); - public override int index_of (G item); - public override void insert (int index, G item); - public override Gee.Iterator<G> iterator (); - public override Gee.ListIterator<G> list_iterator (); - public override bool remove (G item); - public override G remove_at (int index); - public override void @set (int index, G item); - public override Gee.List<G>? slice (int start, int stop); - public void sort_with_data (GLib.CompareDataFunc compare); - public GLib.EqualFunc equal_func { get; private set; } - public override int size { get; } - } - [CCode (cheader_filename = "gee.h")] - public class HashMap<K,V> : Gee.AbstractMap<K,V> { - public HashMap (GLib.HashFunc? key_hash_func = null, GLib.EqualFunc? key_equal_func = null, GLib.EqualFunc? value_equal_func = null); - public override void clear (); - public override V @get (K key); - public override bool has (K key, V value); - public override bool has_key (K key); - public override Gee.MapIterator<K,V> map_iterator (); - public override void @set (K key, V value); - public override bool unset (K key, out V value = null); - public override Gee.Set<Gee.Map.Entry<K,V>> entries { owned get; } - public GLib.EqualFunc key_equal_func { get; private set; } - public GLib.HashFunc key_hash_func { get; private set; } - public override Gee.Set<K> keys { owned get; } - public override int size { get; } - public GLib.EqualFunc value_equal_func { get; private set; } - public override Gee.Collection<V> values { owned get; } - } - [CCode (cheader_filename = "gee.h")] - public class HashMultiMap<K,V> : Gee.AbstractMultiMap<K,V> { - public HashMultiMap (GLib.HashFunc? key_hash_func = null, GLib.EqualFunc? key_equal_func = null, GLib.HashFunc? value_hash_func = null, GLib.EqualFunc? value_equal_func = null); - protected override Gee.MultiSet<K> create_multi_key_set (); - protected override Gee.Collection<V> create_value_storage (); - protected override GLib.EqualFunc get_value_equal_func (); - public GLib.EqualFunc key_equal_func { get; } - public GLib.HashFunc key_hash_func { get; } - public GLib.EqualFunc value_equal_func { get; private set; } - public GLib.HashFunc value_hash_func { get; private set; } - } - [CCode (cheader_filename = "gee.h")] - public class HashMultiSet<G> : Gee.AbstractMultiSet<G> { - public HashMultiSet (GLib.HashFunc? hash_func = null, GLib.EqualFunc? equal_func = null); - public GLib.EqualFunc equal_func { get; } - public GLib.HashFunc hash_func { get; } - } - [CCode (cheader_filename = "gee.h")] - public class HashSet<G> : Gee.AbstractSet<G> { - public HashSet (GLib.HashFunc? hash_func = null, GLib.EqualFunc? equal_func = null); - public override bool add (G key); - public override void clear (); - public override bool contains (G key); - public override Gee.Iterator<G> iterator (); - public override bool remove (G key); - public GLib.EqualFunc equal_func { get; private set; } - public GLib.HashFunc hash_func { get; private set; } - public override int size { get; } - } - [CCode (cheader_filename = "gee.h")] - public class LinkedList<G> : Gee.AbstractList<G>, Gee.Queue<G>, Gee.Deque<G> { - public LinkedList (GLib.EqualFunc? equal_func = null); - public override bool add (G item); - public override void clear (); - public override bool contains (G item); - public override G first (); - public override G @get (int index); - public override int index_of (G item); - public override void insert (int index, G item); - public override Gee.Iterator<G> iterator (); - public override G last (); - public override Gee.ListIterator<G> list_iterator (); - public override bool remove (G item); - public override G remove_at (int index); - public override void @set (int index, G item); - public override Gee.List<G>? slice (int start, int stop); - public GLib.EqualFunc equal_func { get; private set; } - public override int size { get; } - } - [CCode (cheader_filename = "gee.h")] - public class PriorityQueue<G> : Gee.AbstractQueue<G> { - public PriorityQueue (GLib.CompareFunc? compare_func = null); - public override bool add (G item); - public override void clear (); - public override bool contains (G item); - public override int drain (Gee.Collection<G> recipient, int amount = -1); - public override Gee.Iterator<G> iterator (); - public override bool offer (G element); - public override G peek (); - public override G poll (); - public override bool remove (G item); - public override int capacity { get; } - public GLib.CompareFunc compare_func { get; private set; } - public override bool is_full { get; } - public override int remaining_capacity { get; } - public override int size { get; } - } - [CCode (cheader_filename = "gee.h")] - public class TreeMap<K,V> : Gee.AbstractMap<K,V> { - public TreeMap (GLib.CompareFunc? key_compare_func = null, GLib.EqualFunc? value_equal_func = null); - public override void clear (); - public override V @get (K key); - public override bool has (K key, V value); - public override bool has_key (K key); - public override Gee.MapIterator<K,V> map_iterator (); - public override void @set (K key, V value); - public override bool unset (K key, out V value = null); - public override Gee.Set<Gee.Map.Entry<K,V>> entries { owned get; } - public GLib.CompareFunc key_compare_func { get; private set; } - public override Gee.Set<K> keys { owned get; } - public override int size { get; } - public GLib.EqualFunc value_equal_func { get; private set; } - public override Gee.Collection<V> values { owned get; } - } - [CCode (cheader_filename = "gee.h")] - public class TreeMultiMap<K,V> : Gee.AbstractMultiMap<K,V> { - public TreeMultiMap (GLib.CompareFunc? key_compare_func = null, GLib.CompareFunc? value_compare_func = null); - protected override Gee.MultiSet<K> create_multi_key_set (); - protected override Gee.Collection<V> create_value_storage (); - protected override GLib.EqualFunc get_value_equal_func (); - public GLib.CompareFunc key_compare_func { get; } - public GLib.CompareFunc value_compare_func { get; private set; } - } - [CCode (cheader_filename = "gee.h")] - public class TreeMultiSet<G> : Gee.AbstractMultiSet<G> { - public TreeMultiSet (GLib.CompareFunc? compare_func = null); - public GLib.CompareFunc compare_func { get; } - } - [CCode (cheader_filename = "gee.h")] - public class TreeSet<G> : Gee.AbstractSet<G>, Gee.SortedSet<G> { - public TreeSet (GLib.CompareFunc? compare_func = null); - public override bool add (G item); - public override void clear (); - public override bool contains (G item); - public override Gee.Iterator<G> iterator (); - public override bool remove (G item); - public GLib.CompareFunc compare_func { get; private set; } - public override int size { get; } - } - [CCode (cheader_filename = "gee.h")] - public interface BidirIterator<G> : Gee.Iterator<G> { - public abstract bool has_previous (); - public abstract bool last (); - public abstract bool previous (); - } - [CCode (cheader_filename = "gee.h")] - public interface Collection<G> : Gee.Iterable<G> { - public abstract bool add (G item); - public abstract bool add_all (Gee.Collection<G> collection); - public abstract void clear (); - public abstract bool contains (G item); - public abstract bool contains_all (Gee.Collection<G> collection); - public static Gee.Collection<G> empty<G> (); - public abstract bool remove (G item); - public abstract bool remove_all (Gee.Collection<G> collection); - public abstract bool retain_all (Gee.Collection<G> collection); - public abstract G[] to_array (); - public abstract bool is_empty { get; } - public abstract Gee.Collection<G> read_only_view { owned get; } - public abstract int size { get; } - } - [CCode (cheader_filename = "gee.h")] - public interface Comparable<G> : GLib.Object { - public abstract int compare_to (G object); - } - [CCode (cheader_filename = "gee.h")] - public interface Deque<G> : Gee.Queue<G> { - public abstract int drain_head (Gee.Collection<G> recipient, int amount = -1); - public abstract int drain_tail (Gee.Collection<G> recipient, int amount = -1); - public abstract bool offer_head (G element); - public abstract bool offer_tail (G element); - public abstract G peek_head (); - public abstract G peek_tail (); - public abstract G poll_head (); - public abstract G poll_tail (); - } - [CCode (cheader_filename = "gee.h")] - public interface Iterable<G> : GLib.Object { - public abstract Gee.Iterator<G> iterator (); - public abstract GLib.Type element_type { get; } - } - [CCode (cheader_filename = "gee.h")] - public interface Iterator<G> : GLib.Object { - public abstract bool first (); - public abstract G @get (); - public abstract bool has_next (); - public abstract bool next (); - public abstract void remove (); - } - [CCode (cheader_filename = "gee.h")] - public interface List<G> : Gee.Collection<G> { - public static Gee.List<G> empty<G> (); - public abstract G first (); - public abstract G @get (int index); - public abstract int index_of (G item); - public abstract void insert (int index, G item); - public abstract void insert_all (int index, Gee.Collection<G> collection); - public abstract G last (); - public abstract new Gee.ListIterator<G> list_iterator (); - public abstract G remove_at (int index); - public abstract void @set (int index, G item); - public abstract Gee.List<G>? slice (int start, int stop); - public abstract void sort (GLib.CompareFunc? compare_func = null); - public abstract Gee.List<G> read_only_view { owned get; } - } - [CCode (cheader_filename = "gee.h")] - public interface ListIterator<G> : Gee.BidirIterator<G> { - public abstract void add (G item); - public abstract int index (); - public abstract void insert (G item); - public abstract void @set (G item); - } - [CCode (cheader_filename = "gee.h")] - public interface Map<K,V> : GLib.Object, Gee.Iterable<Gee.Map.Entry<K,V>> { - [CCode (cheader_filename = "gee.h")] - public abstract class Entry<K,V> : GLib.Object { - public Entry (); - public abstract K key { get; } - public abstract V value { get; set; } - } - public abstract void clear (); - [Deprecated] - public abstract bool contains (K key); - [Deprecated] - public abstract bool contains_all (Gee.Map<K,V> map); - public static Gee.Map<K,V> empty<K,V> (); - public abstract V @get (K key); - public abstract bool has (K key, V value); - public abstract bool has_all (Gee.Map<K,V> map); - public abstract bool has_key (K key); - public abstract Gee.MapIterator<K,V> map_iterator (); - [Deprecated] - public abstract bool remove (K key, out V value = null); - [Deprecated] - public abstract bool remove_all (Gee.Map<K,V> map); - public abstract void @set (K key, V value); - public abstract void set_all (Gee.Map<K,V> map); - public abstract bool unset (K key, out V value = null); - public abstract bool unset_all (Gee.Map<K,V> map); - public abstract Gee.Set<Gee.Map.Entry<K,V>> entries { owned get; } - public abstract bool is_empty { get; } - public abstract GLib.Type key_type { get; } - public abstract Gee.Set<K> keys { owned get; } - public abstract Gee.Map<K,V> read_only_view { owned get; } - public abstract int size { get; } - public abstract GLib.Type value_type { get; } - public abstract Gee.Collection<V> values { owned get; } - } - [CCode (cheader_filename = "gee.h")] - public interface MapIterator<K,V> : GLib.Object { - public abstract bool first (); - public abstract K get_key (); - public abstract V get_value (); - public abstract bool has_next (); - public abstract bool next (); - public abstract void set_value (V value); - public abstract void unset (); - } - [CCode (cheader_filename = "gee.h")] - public interface MultiMap<K,V> : GLib.Object { - public abstract void clear (); - public abstract bool contains (K key); - public abstract Gee.Collection<V> @get (K key); - public abstract Gee.MultiSet<K> get_all_keys (); - public abstract Gee.Set<K> get_keys (); - public abstract Gee.Collection<V> get_values (); - public abstract bool remove (K key, V value); - public abstract bool remove_all (K key); - public abstract void @set (K key, V value); - public abstract int size { get; } - } - [CCode (cheader_filename = "gee.h")] - public interface MultiSet<G> : Gee.Collection<G> { - public abstract int count (G item); - } - [CCode (cheader_filename = "gee.h")] - public interface Queue<G> : Gee.Collection<G> { - public const int UNBOUNDED_CAPACITY; - public abstract int drain (Gee.Collection<G> recipient, int amount = -1); - public abstract bool offer (G element); - public abstract G peek (); - public abstract G poll (); - public abstract int capacity { get; } - public abstract bool is_full { get; } - public abstract int remaining_capacity { get; } - } - [CCode (cheader_filename = "gee.h")] - public interface Set<G> : Gee.Collection<G> { - public static Gee.Set<G> empty<G> (); - public abstract Gee.Set<G> read_only_view { owned get; } - } - [CCode (cheader_filename = "gee.h")] - public interface SortedSet<G> : Gee.Set<G> { - public abstract Gee.BidirIterator<G> bidir_iterator (); - public abstract G ceil (G element); - public abstract G first (); - public abstract G floor (G element); - public abstract Gee.SortedSet<G> head_set (G before); - public abstract G higher (G element); - public abstract Gee.BidirIterator<G>? iterator_at (G element); - public abstract G last (); - public abstract G lower (G element); - public abstract Gee.SortedSet<G> sub_set (G from, G to); - public abstract Gee.SortedSet<G> tail_set (G after); - } - [CCode (cheader_filename = "gee.h")] - public static int direct_compare (void* _val1, void* _val2); -} diff --git a/vapi/libbamf3.vapi b/vapi/libbamf3.vapi deleted file mode 100644 index 1edeacc..0000000 --- a/vapi/libbamf3.vapi +++ /dev/null @@ -1,166 +0,0 @@ -/* 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/libgnome-menu-3.0.vapi b/vapi/libgnome-menu-3.0.vapi deleted file mode 100644 index 0afbea0..0000000 --- a/vapi/libgnome-menu-3.0.vapi +++ /dev/null @@ -1,93 +0,0 @@ -/* libgnome-menu-3.0.vapi generated by vapigen, do not modify. */ - -namespace GMenu { - [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h")] - public class Tree : GLib.Object { - [CCode (has_construct_function = false)] - public Tree (string menu_basename, GMenu.TreeFlags flags); - [CCode (has_construct_function = false)] - public Tree.for_path (string menu_path, GMenu.TreeFlags flags); - public unowned string get_canonical_menu_path (); - public unowned GMenu.TreeDirectory get_directory_from_path (string path); - public unowned GMenu.TreeEntry get_entry_by_id (string id); - public unowned GMenu.TreeDirectory get_root_directory (); - public static void* item_ref (void* item); - public static void item_unref (void* item); - public bool load_sync () throws GLib.Error; - [NoAccessorMethod] - public GMenu.TreeFlags flags { get; construct; } - [NoAccessorMethod] - public string menu_basename { owned get; construct; } - [NoAccessorMethod] - public string menu_path { owned get; construct; } - public virtual signal void changed (); - } - [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h")] - [Compact] - public class TreeAlias { - public unowned GMenu.TreeDirectory get_aliased_directory (); - public unowned GMenu.TreeEntry get_aliased_entry (); - public GMenu.TreeItemType get_aliased_item_type (); - public unowned GMenu.TreeDirectory get_directory (); - } - [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h")] - [Compact] - public class TreeDirectory { - public unowned string get_comment (); - public unowned string get_desktop_file_path (); - public unowned string get_generic_name (); - public unowned GLib.Icon get_icon (); - public bool get_is_nodisplay (); - public unowned string get_menu_id (); - public unowned string get_name (); - public unowned GMenu.TreeDirectory get_parent (); - public unowned GMenu.TreeIter iter (); - public unowned string make_path (GMenu.TreeEntry entry); - } - [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h")] - [Compact] - public class TreeEntry { - public unowned GLib.DesktopAppInfo get_app_info (); - public unowned string get_desktop_file_id (); - public unowned string get_desktop_file_path (); - public bool get_is_excluded (); - public unowned GMenu.TreeDirectory get_parent (); - } - [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h")] - [Compact] - public class TreeHeader { - public unowned GMenu.TreeDirectory get_directory (); - } - [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h", ref_function = "gmenu_tree_iter_ref", unref_function = "gmenu_tree_iter_unref")] - [Compact] - public class TreeIter { - public unowned GMenu.TreeAlias get_alias (); - public unowned GMenu.TreeDirectory get_directory (); - public unowned GMenu.TreeEntry get_entry (); - public unowned GMenu.TreeHeader get_header (); - public GMenu.TreeItemType next (); - } - [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h")] - [Compact] - public class TreeSeparator { - } - [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h", cprefix = "GMENU_TREE_FLAGS_")] - [Flags] - public enum TreeFlags { - NONE, - INCLUDE_EXCLUDED, - SHOW_EMPTY, - INCLUDE_NODISPLAY, - SHOW_ALL_SEPARATORS, - SORT_DISPLAY_NAME - } - [CCode (cheader_filename = "gnome-menus-3.0/gmenu-tree.h", cprefix = "GMENU_TREE_ITEM_", has_type_id = false)] - public enum TreeItemType { - INVALID, - DIRECTORY, - ENTRY, - SEPARATOR, - HEADER, - ALIAS - } -} diff --git a/vapi/libwnck-3.0.deps b/vapi/libwnck-3.0.deps deleted file mode 100644 index 85f5d99..0000000 --- a/vapi/libwnck-3.0.deps +++ /dev/null @@ -1,2 +0,0 @@ -gio-2.0 -gtk+-3.0 diff --git a/vapi/libwnck-3.0.vapi b/vapi/libwnck-3.0.vapi deleted file mode 100644 index 94c52a8..0000000 --- a/vapi/libwnck-3.0.vapi +++ /dev/null @@ -1,369 +0,0 @@ -/* 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 deleted file mode 100644 index e762c58..0000000 --- a/vapi/unique-3.0.deps +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 79f67c5..0000000 --- a/vapi/unique-3.0.vapi +++ /dev/null @@ -1,94 +0,0 @@ -/* 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; -} diff --git a/vapi/x11.vapi b/vapi/x11.vapi deleted file mode 100644 index cf80228..0000000 --- a/vapi/x11.vapi +++ /dev/null @@ -1,996 +0,0 @@ -/* x11.vapi - * - * Copyright (C) 2009 Jürg Billeter - * Copyright (C) 2011 Alexander Kurtz - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Authors: - * Jürg Billeter <j@bitron.ch> - * Alexander Kurtz <kurtz.alex@googlemail.com> - */ - -[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "X11/Xlib.h,X11/Xatom.h,X11/Xutil.h,X11/Xregion.h")] -namespace X { - // Note: must be called before opening a display or calling any other Xlib function, - // see http://tronche.com/gui/x/xlib/display/XInitThreads.html - [CCode (cname = "XInitThreads")] - public Status init_threads (); - - [Compact] - [CCode (cname = "Display", ref_function = "", unref_function = "")] - public class Display { - [CCode (cname = "XOpenDisplay")] - public Display (string? name = null); - - [CCode (cname = "XAllPlanes")] - public static ulong get_all_planes (); - - [CCode (cname = "XActivateScreenSaver")] - public void activate_screensaver (); - - [CCode (cname = "XAddToSaveSet")] - public int add_to_save_set (Window w); - - [CCode (cname = "XAllowEvents")] - public int allow_events (int event_mode, int time); - - [CCode (cname = "XBitmapBitOrder")] - public int bitmap_bit_order (); - - [CCode (cname = "XBitmapUnit")] - public int bitmap_scanline_unit (); - - [CCode (cname = "XBitmapPad")] - public int bitmap_scanline_padding (); - - [CCode (cname = "XChangeProperty")] - public int change_property (Window w, Atom property, Atom type, int format, int mode, [CCode (array_length = false)] uchar[] data, int nelements); - - [CCode (cname = "XChangeWindowAttributes")] - public int change_window_attributes (Window w, ulong valuemask, SetWindowAttributes attributes); - - [CCode (cname = "XConfigureWindow")] - public int configure_window (Window w, uint value_mask, WindowChanges values); - - [CCode (cname = "ConnectionNumber")] - public int connection_number (); - - [CCode (cname = "DefaultRootWindow")] - public Window default_root_window (); - - [CCode (cname = "XDefaultScreenOfDisplay")] - public unowned Screen default_screen (); - - [CCode (cname = "XScreenOfDisplay")] - public unowned Screen screen_by_id (int screen_number); - - [CCode (cname = "DisplayString")] - public string display_string (); - - [CCode (cname = "XQLength")] - public int event_queue_length (); - - [CCode (cname = "XFlush")] - public int flush (); - - [CCode (cname = "XForceScreenSaver")] - public void force_screensaver (int mode); - - [CCode (cname = "XGetKeyboardMapping", array_length = false)] - public unowned uint[] get_keyboard_mapping (uint first_keycode, int keycode_count, ref int keysyms_per_keycode_return); - - [CCode (cname = "XGetModifierMapping")] - public ModifierKeymap get_modifier_mapping (); - - [CCode (cname = "XGetScreenSaver")] - public void get_screensaver (out int timeout, out int interval, out int prefer_blanking, out int allow_exposures); - - [CCode (cname = "XGetSelectionOwner")] - public Window get_selection_owner (Atom selection); - - [CCode (cname = "XGetWindowAttributes")] - public void get_window_attributes (Window w, out WindowAttributes window_attributes_return); - - [CCode (cname = "XGetWindowProperty")] - public int get_window_property (Window w, Atom property, long long_offset, long long_length, bool delete, Atom req_type, out Atom actual_type_return, out int actual_format_return, out ulong nitems_return, out ulong bytes_after_return, [CCode (type = "unsigned char **")] out void* prop_return); - - [CCode (cname = "XGrabButton")] - public int grab_button (uint button, uint modifiers, Window grab_window, bool owner_events, uint event_mask, int pointer_mode, int keyboard_mode, Window confine_to, uint cursor); - - [CCode (cname = "XGrabKey")] - public int grab_key (int keycode, uint modifiers, Window grab_window, bool owner_events, int pointer_mode, int keyboard_mode); - - [CCode (cname = "XGrabPointer")] - public int grab_pointer (Window grab_window, bool owner_events, uint event_mask, int pointer_mode, int keyboard_mode, Window confine_to, uint cursor, int time); - - [CCode (cname = "XGrabServer")] - public int grab_server (); - - [CCode (cname = "XImageByteOrder")] - public int image_byte_order (); - - [CCode (cname = "XInternAtom")] - public Atom intern_atom (string atom_name, bool only_if_exists); - - [CCode (cname = "XInternAtoms")] - public void intern_atoms (string[] names, bool only_if_exists, [CCode (array_length = false)] Atom[] atoms_return); - - [CCode (cname = "XInternalConnectionNumbers")] - public Status internal_connection_numbers (ref int[] fd_return); - - [CCode (cname = "XDisplayKeycodes")] - public int keycodes (ref int min_keycodes_return, ref int max_keycodes_return); - - [CCode (cname = "XKeysymToKeycode")] - public int keysym_to_keycode (uint keysym); - - [CCode (cname = "XLastKnownRequestProcessed")] - public ulong last_known_request_processed (); - - [CCode (cname = "XLockDisplay")] - public void lock_display (); - - [CCode (cname = "XMapWindow")] - public int map_window (Window w); - - [CCode (cname = "XMaxRequestSize")] - public long max_request_size (); - - [CCode (cname = "XExtendedMaxRequestSize")] - public long max_extended_request_size (); - - [CCode (cname = "XEventsQueued")] - public int events_queued (int mode); - - [CCode (cname = "XNextEvent")] - public int next_event (ref Event event_return); - - [CCode (cname = "XNextRequest")] - public ulong next_request (); - - [CCode (cname = "XNoOp")] - public void no_operation (); - - [CCode (cname = "XScreenCount")] - public int number_of_screens (); - - [CCode (cname = "XPending")] - public int pending (); - - [CCode (cname = "XProcessInternalConnection")] - public void process_internal_connection (int fd); - - [CCode (cname = "XProtocolVersion")] - public int protocol_version (); - - [CCode (cname = "XProtocolRevision")] - public int protocol_revision (); - - [CCode (cname = "XRaiseWindow")] - public int raise_window (Window w); - - [CCode (cname = "XReparentWindow")] - public int reparent_window (Window w, Window parent, int x, int y); - - [CCode (cname = "XResetScreenSaver")] - public void reset_screensaver (); - - [CCode (cname = "XResizeWindow")] - public int resize_window (Window w, uint width, uint height); - - [CCode (cname = "XRootWindow")] - public Window root_window (int screen_number); - - [CCode (cname = "ScreenCount")] - public int screen_count (); - - [CCode (cname = "XScreenOfDisplay")] - public unowned Screen screen_of_display (int screen_number); - - [CCode (cname = "XSelectInput")] - public int select_input (Window w, long event_mask); - - [CCode (cname = "XSendEvent")] - public void send_event (Window w, bool propagate, long event_mask, ref Event event_send); - - [CCode (cname = "XSetCloseDownMode")] - public void set_close_down_mode (int close_mode); - - [CCode (cname = "XSetScreenSaver")] - public void set_screensaver (int timeout, int interval, int prefer_blanking, int allow_exposures); - - [CCode (cname = "XSetSelectionOwner")] - public Window set_selection_owner (Atom selection, Window owner, int time); - - [CCode (cname = "XSetInputFocus")] - public int set_input_focus (Window focus, int revert_to, int time); - - [CCode (cname = "XUngrabButton")] - public int ungrab_button (uint button, uint modifiers, Window grab_window); - - [CCode (cname = "XUngrabKey")] - public int ungrab_key (int keycode, uint modifiers, Window grab_window); - - [CCode (cname = "XUngrabPointer")] - public int ungrab_pointer (int time); - - [CCode (cname = "XUngrabServer")] - public int ungrab_server (); - - [CCode (cname = "XUnlockDisplay")] - public void unlock_display (); - - [CCode (cname = "XUnmapWindow")] - public int unmap_window (Window w); - - [CCode (cname = "XQueryTree")] - public void query_tree (Window w, out Window root_return, out Window parent_return, out Window[] children_return); - - [CCode (cname = "XWindowEvent")] - public int window_event (Window w, EventMask event_mask, out Event event_return); - - [CCode (cname = "XServerVendor")] - public string xserver_vendor_name (); - - [CCode (cname = "XVendorRelease")] - public string xserver_vendor_release (); - - [CCode (cname = "XMoveWindow")] - public void move_window (Window window, int x, int y); - } - - [Compact] - [CCode (cname = "XModifierKeymap", free_function = "XFreeModifiermap")] - public class ModifierKeymap { - // The server's max # of keys per modifier - public int max_keypermod; - // An 8 by max_keypermod array of modifiers - public uchar[] modifiermap; - } - - [SimpleType] - [IntegerType (rank = 9)] - [CCode (cname = "Atom")] - public struct Atom { - } - - [SimpleType] - [IntegerType (rank = 9)] - [CCode (cname = "Colormap")] - public struct Colormap { - } - - [SimpleType] - [CCode (cname = "GC")] - public struct GC { - } - - [SimpleType] - [IntegerType (rank = 9)] - [CCode (cname = "Status")] - public struct Status { - } - - [SimpleType] - [IntegerType (rank = 9)] - [CCode (cname = "XID", type_id = "G_TYPE_INT", - marshaller_type_name = "INT", - get_value_function = "g_value_get_int", - set_value_function = "g_value_set_int", default_value = "0", - type_signature = "i")] - public struct ID { - } - - [SimpleType] - [IntegerType (rank = 9)] - [CCode (cname = "Drawable", type_id = "G_TYPE_INT", - marshaller_type_name = "INT", - get_value_function = "g_value_get_int", - set_value_function = "g_value_set_int", default_value = "0", - type_signature = "i")] - public struct Drawable : ID - { - } - - [SimpleType] - [IntegerType (rank = 9)] - [CCode (cname = "Window", type_id = "G_TYPE_INT", - marshaller_type_name = "INT", - get_value_function = "g_value_get_int", - set_value_function = "g_value_set_int", default_value = "0", - type_signature = "i")] - public struct Window : Drawable { - } - - - [SimpleType] - [IntegerType (rank = 9)] - [CCode (cname = "Pixmap", type_id = "G_TYPE_INT", - marshaller_type_name = "INT", - get_value_function = "g_value_get_int", - set_value_function = "g_value_set_int", default_value = "0", - type_signature = "i")] - public struct Pixmap : Drawable { - } - - [SimpleType] - [IntegerType (rank = 9)] - [CCode (cname = "Mask")] - public struct Mask { - } - - [SimpleType] - [IntegerType (rank = 9)] - [CCode (cname = "VisualID")] - public struct VisualID { - } - - [SimpleType] - [IntegerType (rank = 9)] - [CCode (cname = "Time")] - public struct Time { - } - - [SimpleType] - [IntegerType (rank = 9)] - [CCode (cname = "Cursor")] - public struct Cursor { - } - - [SimpleType] - [IntegerType (rank = 9)] - [CCode (cname = "GContext")] - public struct GContext { - } - - [SimpleType] - [IntegerType (rank = 9)] - [CCode (cname = "KeySym")] - public struct KeySym { - } - - [SimpleType] - [IntegerType (rank = 9)] - [CCode (cname = "KeyCode")] - public struct KeyCode { - } - - public struct Visual { - } - - public struct WindowChanges { - public int x; - public int y; - public int width; - public int height; - public int border_width; - public Window sibling; - public int stack_mode; - } - public struct SizeHints { - public long @flags; - public int x; - public int y; - public int width; - public int height; - } - - [CCode (cname = "XCreateWindow")] - public Window create_window (Display display, Window parent, int x, int y, uint width, uint height, uint border_width, int depth, uint @class, Visual? visual, X.CW valuemask, ref SetWindowAttributes attributes); - - [CCode (cname = "XSetWindowAttributes")] - public struct SetWindowAttributes { - // public Pixmap background_pixmap; /* background or None or ParentRelative */ - public ulong background_pixel; /* background pixel */ - // public Pixmap border_pixmap; /* border of the window */ - public ulong border_pixel; /* border pixel value */ - public int bit_gravity; /* one of bit gravity values */ - public int win_gravity; /* one of the window gravity values */ - public int backing_store; /* NotUseful, WhenMapped, Always */ - public ulong backing_planes;/* planes to be preseved if possible */ - public ulong backing_pixel;/* value to use in restoring planes */ - public bool save_under; /* should bits under be saved? (popups) */ - public long event_mask; /* set of events that should be saved */ - public long do_not_propagate_mask; /* set of events that should not propagate */ - public bool override_redirect; /* boolean value for override-redirect */ - // public Colormap colormap; /* color map to be associated with window */ - // public Cursor cursor; /* cursor to be displayed (or None) */ - } - - [CCode(cname = "XWindowAttributes", - cheader_filename = "X11/Xlib.h,X11/Xatom.h,X11/Xutil.h")] - public struct WindowAttributes { - public int x; - public int y; /* location of window */ - public int width; - public int height; /* width and height of window */ - public int border_width; /* border width of window */ - public int depth; /* depth of window */ - public Visual visual; /* the associated visual structure */ - public Window root; /* root of screen containing window */ - public int @class; /* InputOutput, InputOnly*/ - public int bit_gravity; /* one of bit gravity values */ - public int win_gravity; /* one of the window gravity values */ - public int backing_store; /* NotUseful, WhenMapped, Always */ - public ulong backing_planes;/* planes to be preserved if possible */ - public ulong backing_pixel;/* value to be used when restoring planes */ - public bool save_under; /* boolean, should bits under be saved? */ - // public Colormap colormap; /* color map to be associated with window */ - public bool map_installed; /* boolean, is color map currently installed*/ - public int map_state; /* IsUnmapped, IsUnviewable, IsViewable */ - public long all_event_masks; /* set of events all people have interest in*/ - public long your_event_mask; /* my event mask */ - public long do_not_propagate_mask; /* set of events that should not propagate */ - public bool override_redirect; /* boolean value for override-redirect */ - // public Screen screen; /* back pointer to correct screen */ - } - - [CCode (cname = "CopyFromParent")] - public const int COPY_FROM_PARENT; - - [CCode (cname = "CurrentTime")] - public const ulong CURRENT_TIME; - - [CCode (cname = "Success")] - public int Success; - - [CCode (cname = "XFree")] - public int free (void* data); - - [CCode (cprefix = "CW", cname = "int")] - public enum CW { - BackPixmap, - BackPixel, - BackingStore, - BackingPlanes, - BackingPixel, - BitGravity, - BorderPixmap, - BorderPixel, - BorderWidth, - Colormap, - Cursor, - DontPropagate, - EventMask, - Height, - OverrideRedirect, - SaveUnder, - Sibling, - StackMode, - X, - Y, - Width, - WinGravity - } - - [CCode (cprefix = "GrabMode")] - public enum GrabMode { - Sync, - Async - } - - [CCode (cprefix = "")] - public enum EventMask { - NoEventMask, - KeyPressMask, - KeyReleaseMask, - ButtonPressMask, - ButtonReleaseMask, - EnterWindowMask, - LeaveWindowMask, - PointerMotionMask, - PointerMotionHintMask, - Button1MotionMask, - Button2MotionMask, - Button3MotionMask, - Button4MotionMask, - Button5MotionMask, - ButtonMotionMask, - KeymapStateMask, - ExposureMask, - VisibilityChangeMask, - StructureNotifyMask, - ResizeRedirectMask, - SubstructureNotifyMask, - SubstructureRedirectMask, - FocusChangeMask, - PropertyChangeMask, - ColormapChangeMask, - OwnerGrabButtonMask - } - - [CCode (cprefix = "")] - public enum KeyMask { - ShiftMask, - LockMask, - ControlMask, - Mod1Mask, - Mod2Mask, - Mod3Mask, - Mod4Mask, - Mod5Mask - } - - [CCode (cprefix = "")] - public enum EventType { - KeyPress, - KeyRelease, - ButtonPress, - ButtonRelease, - MotionNotify, - EnterNotify, - LeaveNotify, - FocusIn, - FocusOut, - KeymapNotify, - Expose, - GraphicsExpose, - NoExpose, - VisibilityNotify, - CreateNotify, - DestroyNotify, - UnmapNotify, - MapNotify, - MapRequest, - ReparentNotify, - ConfigureNotify, - ConfigureRequest, - GravityNotify, - ResizeRequest, - CirculateNotify, - CirculateRequest, - PropertyNotify, - SelectionClear, - SelectionRequest, - SelectionNotify, - ColormapNotify, - ClientMessage, - MappingNotify - } - - // union - [CCode (cname = "XEvent")] - public struct Event { - public int type; - public AnyEvent xany; - public KeyEvent xkey; - public ButtonEvent xbutton; - public MotionEvent xmotion; - public CrossingEvent xcrossing; - public CreateWindowEvent xcreatewindow; - public DestroyWindowEvent xdestroywindow; - public UnmapEvent xunmap; - public MapEvent xmap; - public MapRequestEvent xmaprequest; - public ReparentEvent xreparent; - public ConfigureEvent xconfigure; - public GravityEvent xgravity; - public ConfigureRequestEvent xconfigurerequest; - public CirculateEvent xcirculate; - public CirculateRequestEvent xcirculaterequest; - public PropertyEvent xproperty; - public SelectionEvent xselection; - public ClientMessageEvent xclient; - } - - [CCode (cname = "XAnyEvent")] - public struct AnyEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window window; - } - - [CCode (cname = "XKeyEvent")] - public struct KeyEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window window; - public Window root; - public Window subwindow; - public ulong time; - public int x; - public int y; - public int x_root; - public int y_root; - public uint state; - public uint keycode; - public bool same_screen; - } - - [CCode (cname = "XButtonEvent")] - public struct ButtonEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window window; - public Window subwindow; - public ulong time; - public int x; - public int y; - public int x_root; - public int y_root; - public uint state; - public uint button; - public bool same_screen; - } - - [CCode (cname = "XMotionEvent")] - public struct MotionEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window window; - public Window subwindow; - public ulong time; - public int x; - public int y; - public int x_root; - public int y_root; - public uint state; - public char is_hint; - public bool same_screen; - } - - [CCode (cname = "XCrossingEvent")] - public struct CrossingEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window window; - public Window root; - public Window subwindow; - public ulong time; - public int x; - public int y; - public int x_root; - public int y_root; - public int mode; - public int detail; - public bool same_screen; - public bool focus; - public uint state; - } - - [CCode (cname = "XCreateWindowEvent")] - public struct CreateWindowEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window parent; - public Window window; - public int x; - public int y; - public int width; - public int height; - public int border_width; - public bool override_redirect; - } - - [CCode (cname = "XDestroyWindowEvent")] - public struct DestroyWindowEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window event; - public Window window; - } - - [CCode (cname = "XUnmapEvent")] - public struct UnmapEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window event; - public Window window; - public bool from_configure; - } - - [CCode (cname = "XMapEvent")] - public struct MapEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window event; - public Window window; - public bool override_redirect; - } - - [CCode (cname = "XMapRequestEvent")] - public struct MapRequestEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window parent; - public Window window; - } - - [CCode (cname = "XReparentEvent")] - public struct ReparentEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window event; - public Window window; - public Window parent; - public int x; - public int y; - public bool override_redirect; - } - - [CCode (cname = "XConfigureEvent")] - public struct ConfigureEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window event; - public Window window; - public int x; - public int y; - public int width; - public int height; - public int border_width; - public Window above; - public bool override_redirect; - } - - [CCode (cname = "XGravityEvent")] - public struct GravityEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window event; - public Window window; - public int x; - public int y; - } - - [CCode (cname = "XConfigureRequestEvent")] - public struct ConfigureRequestEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window parent; - public Window window; - public int x; - public int y; - public int width; - public int height; - public int border_width; - public Window above; - public int detail; - public ulong value_mask; - } - - [CCode (cname = "XCirculateEvent")] - public struct CirculateEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window event; - public Window window; - public int place; - } - - [CCode (cname = "XCirculateRequestEvent")] - public struct CirculateRequestEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window parent; - public Window window; - public int place; - } - - [CCode (cname = "XPropertyEvent")] - public struct PropertyEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window window; - public Atom atom; - public ulong time; - public int state; - } - - [CCode (cname = "XSelectionEvent")] - public struct SelectionEvent { - public int type; - public ulong serial; - public bool send_event; - public unowned Display display; - public Window requestor; - public Atom selection; - public Atom target; - public Atom property; - public ulong time; - } - - [CCode (cname = "XClientMessageEvent")] - public struct ClientMessageEvent { - public int type; - public ulong serial; /* # of last request processed by server */ - public bool send_event; /* true if this came from a SendEvent request */ - public unowned Display display; /* Display the event was read from */ - public Window window; - public Atom message_type; - public int format; - public ClientMessageEventData data; - } - - [CCode (cname = "RECTANGLE", has_type_id = false)] - public struct Rectangle { - public short x; - public short y; - public short width; - public short height; - } - - // union - public struct ClientMessageEventData { - public unowned char[] b; - public unowned short[] s; - public unowned long[] l; - } - - [CCode (cprefix = "Queued")] - public enum QueuedMode { - Already, - AfterFlush, - AfterReading - } - - [CCode (cprefix = "PropMode")] - public enum PropMode { - Replace, - Prepend, - Append - } - - [CCode (cprefix = "")] - public enum AllowEventsMode { - AsyncPointer, - SyncPointer, - ReplayPointer, - AsyncKeyboard, - SyncKeyboard, - ReplayKeyboard, - AsyncBoth, - SyncBoth - } - - [CCode (cprefix = "")] - public enum MapState { - IsUnmapped, - IsUnviewable, - IsViewable - } - - [CCode (cprefix = "RevertTo")] - public enum RevertTo { - None, - PointerRoot, - Parent - } - - [Compact] - [CCode (cname = "Screen")] - public class Screen { - public Display display; - public Window root; - public int width; - public int height; - - [CCode (cname = "XScreenOfDisplay")] - public static unowned Screen get_screen (Display disp, int screen_number); - - [CCode (cname = "XBlackPixelOfScreen")] - public ulong black_pixel_of_screen (); - - [CCode (cname = "XCellsOfScreen")] - public int cells_of_screen (); - - [CCode (cname = "XDefaultColormapOfScreen")] - public Colormap default_colormap_of_screen (); - - [CCode (cname = "XDefaultDepthOfScreen")] - public int default_depth_of_screen (); - - [CCode (cname = "XDefaultGCOfScreen")] - public GC default_gc_of_screen (); - - [CCode (cname = "XDefaultVisualOfScreen")] - public Visual default_visual_of_screen (); - - [CCode (cname = "XDisplayOfScreen")] - public unowned Display display_of_screen (); - - [CCode (cname = "XDoesBackingStore")] - public int does_backing_store (); - - [CCode (cname = "XDoesSaveUnders")] - public bool does_save_unders (); - - [CCode (cname = "XEventMaskOfScreen")] - public long event_mask_of_Screen (); - - [CCode (cname = "XHeightMMOfScreen")] - public int height_in_mm_of_screen (); - - [CCode (cname = "XHeightOfScreen")] - public int height_of_screen (); - - [CCode (cname = "XMaxCmapsOfScreen")] - public int max_colormaps_of_screen (); - - [CCode (cname = "XMinCmapsOfScreen")] - public int min_colormaps_of_screen (); - - [CCode (cname = "XPlanesOfScreen")] - public int planes_of_screen (); - - [CCode (cname = "XRootWindowOfScreen")] - public Window root_window_of_screen (); - - [CCode (cname = "XScreenNumberOfScreen")] - public int screen_number_of_screen (); - - [CCode (cname = "XWhitePixelOfScreen")] - public ulong white_pixel_of_screen (); - - [CCode (cname = "XWidthMMOfScreen")] - public int width_in_mm_of_screen (); - - [CCode (cname = "XWidthOfScreen")] - public int width_of_screen (); - } - - public const X.ID None; - - public const X.Atom XA_ATOM; - public const X.Atom XA_CARDINAL; - public const X.Atom XA_WINDOW; - public const X.Atom XA_WM_CLASS; - public const X.Atom XA_WM_HINTS; - public const X.Atom XA_WM_ICON_NAME; - public const X.Atom XA_WM_NAME; - public const X.Atom XA_WM_NORMAL_HINTS; - public const X.Atom XA_WM_TRANSIENT_FOR; - - public const uint XK_Num_Lock; - public const uint XK_Scroll_Lock; - public const uint XK_Super_L; - public const uint XK_Super_R; -} - diff --git a/vapi/xtst.vapi b/vapi/xtst.vapi deleted file mode 100644 index a773dfa..0000000 --- a/vapi/xtst.vapi +++ /dev/null @@ -1,60 +0,0 @@ -/* xtst.vapi - * - * Copyright (C) 2011 Alexander Kurtz - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Author: - * Alexander Kurtz <kurtz.alex@googlemail.com> - */ - - -[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "X11/extensions/XTest.h")] -namespace X { - class Test { - [CCode (cname = "XTestQueryExtension")] - public static bool query_extension(Display display, out int event_base_return, out int error_base_return, out int major_version_return, out int minor_version_return); - - [CCode (cname = "XTestCompareCursorWithWindow")] - public static bool compare_cursor_with_window(Display display, Window window, Cursor cursor); - - [CCode (cname = "XTestCompareCurrentCursorWithWindow")] - public static bool compare_current_cursor_with_window(Display display, Window window); - - [CCode (cname = "XTestFakeKeyEvent")] - public static int fake_key_event(Display display, uint keycode, bool is_press, ulong delay); - - [CCode (cname = "XTestFakeButtonEvent")] - public static int fake_button_event(Display display, uint button, bool is_press, ulong delay); - - [CCode (cname = "XTestFakeMotionEvent")] - public static int fake_motion_event(Display display, int screen_number, int x, int y, ulong delay); - - [CCode (cname = "XTestFakeRelativeMotionEvent")] - public static int fake_relative_motion_event(Display display, int screen_number, int x, int y, ulong delay); - - [CCode (cname = "XTestGrabControl")] - public static int grab_control(Display display, bool impervious); - - [CCode (cname = "XTestSetGContextOfGC")] - public static void set_g_context_of_gc(GC gc, GContext gid); - - [CCode (cname = "XTestSetVisualIDOfVisual")] - public static void set_visual_id_of_visual(Visual visual, VisualID visualid); - - [CCode (cname = "XTestDiscard")] - public static Status discard(Display display); - } -} |