diff options
| author | Didier Roche <didier.roche@canonical.com> | 2011-02-24 19:13:04 +0100 |
|---|---|---|
| committer | Didier Roche <didier.roche@canonical.com> | 2011-02-24 19:13:04 +0100 |
| commit | 7f0ed418a739594628f302ca93da538289a75d6b (patch) | |
| tree | cef0b2647431b04ade0957035dc3ed4eca7ec912 | |
| parent | 1c93238eadf8e691598255c11beebe391a6eb4f7 (diff) | |
| parent | bbf902e80a194c74f895e182ec979ab178f4eeaa (diff) | |
Import upstream version 3.4.6upstream-3.4.6
(bzr r55.4.44)
102 files changed, 2771 insertions, 1729 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e4fedb93..3a1962a62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ subdirs (services tests tools doc) set (PROJECT_NAME "unity") set (UNITY_MAJOR 3) set (UNITY_MINOR 4) -set (UNITY_MICRO 4) +set (UNITY_MICRO 6) set (UNITY_VERSION "${UNITY_MAJOR}.${UNITY_MINOR}.${UNITY_MICRO}") set (UNITY_API_VERSION "3.0") @@ -94,7 +94,7 @@ endif (DISABLE_MAINTAINER_CFLAGS) # # src (Compiz Plugin) # -set (UNITY_PLUGIN_DEPS "nux-0.9;libbamf;dee-1.0;gio-2.0;gio-unix-2.0;dbusmenu-glib-0.4;x11;libstartup-notification-1.0;gthread-2.0;indicator;atk;unity-misc") +set (UNITY_PLUGIN_DEPS "nux-0.9;libbamf;dee-1.0;gio-2.0;gio-unix-2.0;dbusmenu-glib-0.4;x11;libstartup-notification-1.0;gthread-2.0;indicator;atk;unity-misc;gconf-2.0") find_package (Compiz REQUIRED) include (CompizPlugin) diff --git a/com.canonical.Unity.gschema.xml b/com.canonical.Unity.gschema.xml index 66f291e12..cdd04ace3 100644 --- a/com.canonical.Unity.gschema.xml +++ b/com.canonical.Unity.gschema.xml @@ -1,4 +1,17 @@ <schemalist> + <enum id="form-factor-enum"> + <value nick="Automatic" value="0" /> + <value nick="Desktop" value="1" /> + <value nick="Netbook" value="2" /> + </enum> + + <schema path="/desktop/unity/" id="com.canonical.Unity" gettext-domain="unity"> + <key enum="form-factor-enum" name="form-factor"> + <default>"Automatic"</default> + <summary>The form factor Unity should target.</summary> + <description>The form factor chosen will affect the size and appearance of the Dash, Launcher and also the Window Management behaviour.</description> + </key> + </schema> <schema path="/desktop/unity/launcher/" id="com.canonical.Unity.Launcher" gettext-domain="unity"> <key type="as" name="favorites"> <default>[ 'ubiquity-gtkui.desktop', 'nautilus.desktop', 'firefox.desktop', 'ubuntuone-control-panel-gtk.desktop', 'tomboy.desktop' ]</default> @@ -10,7 +23,7 @@ <summary>Version of last migration done</summary> <description>This is a detection key for the favorite migration script to know whether the needed migration is done or not.</description> </key> - </schema> + </schema> <schema path="/desktop/unity/panel/" id="com.canonical.Unity.Panel" gettext-domain="unity"> <key type="as" name="systray-whitelist"> <default>[ 'JavaEmbeddedFrame', 'Wine', 'Skype' ]</default> @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Arabic\n" @@ -16,69 +16,58 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "إبقاء في برنامج Launcher" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "إبقاء في برنامج Launcher" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "إنهاء" -#, fuzzy -msgid "Remove from launcher" -msgstr "حذف من برنامج Launcher" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "حذف من برنامج Launcher" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Bulgarian\n" @@ -16,69 +16,58 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Остави в програмата за стартиране" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Остави в програмата за стартиране" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Излез" -#, fuzzy -msgid "Remove from launcher" -msgstr "Премахни от програмата за стартиране" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Премахни от програмата за стартиране" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Czech\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Ponechat ve Spouštěči" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Ponechat ve Spouštěči" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Konec" -#, fuzzy -msgid "Remove from launcher" -msgstr "Odebrat ze Spouštěče" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Odebrat ze Spouštěče" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Danish\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Behold i Launcher" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Behold i Launcher" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Afslut" -#, fuzzy -msgid "Remove from launcher" -msgstr "Fjern fra Launcher" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Fjern fra Launcher" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: German\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Im Startprogramm behalten" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Im Startprogramm behalten" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Beenden" -#, fuzzy -msgid "Remove from launcher" -msgstr "Aus Startprogramm entfernen" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Aus Startprogramm entfernen" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Greek\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Διατήρηση στο πρόγραμμα εκκίνησης" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Διατήρηση στο πρόγραμμα εκκίνησης" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Κλείσιμο" -#, fuzzy -msgid "Remove from launcher" -msgstr "Κατάργηση από το πρόγραμμα εκκίνησης" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Κατάργηση από το πρόγραμμα εκκίνησης" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Spanish\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Conservar en el iniciador" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Conservar en el iniciador" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Salir" -#, fuzzy -msgid "Remove from launcher" -msgstr "Quitar del iniciador" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Quitar del iniciador" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Finnish\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Pidä Launcherissa" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Pidä Launcherissa" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Lopeta" -#, fuzzy -msgid "Remove from launcher" -msgstr "Poista Launcherista" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Poista Launcherista" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: French\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Conserver dans le lanceur" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Conserver dans le lanceur" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Quitter" -#, fuzzy -msgid "Remove from launcher" -msgstr "Supprimer du lanceur" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Supprimer du lanceur" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Hebrew\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "שמור ב- Launcher" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "שמור ב- Launcher" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "יציאה" -#, fuzzy -msgid "Remove from launcher" -msgstr "מהסר מ- Launcher" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "מהסר מ- Launcher" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Hindi\n" @@ -16,69 +16,58 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "लॉन्चर में रखें" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "लॉन्चर में रखें" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "छोड़ें" -#, fuzzy -msgid "Remove from launcher" -msgstr "लॉन्चर से निकालें" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "लॉन्चर से निकालें" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Croatian\n" @@ -18,69 +18,58 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Zadrži u programu za pokretanje" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Zadrži u programu za pokretanje" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Izlaz" -#, fuzzy -msgid "Remove from launcher" -msgstr "Ukloni iz programa za pokretanje" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Ukloni iz programa za pokretanje" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Hungarian\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Megtartás a Launcherben" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Megtartás a Launcherben" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Kilépés" -#, fuzzy -msgid "Remove from launcher" -msgstr "Eltávolítás a Launcherből" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Eltávolítás a Launcherből" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Italian\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Mantieni in Launcher" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Mantieni in Launcher" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Esci" -#, fuzzy -msgid "Remove from launcher" -msgstr "Rimuovi da Launcher" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Rimuovi da Launcher" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Japanese\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Launcher に残す" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Launcher に残す" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "中止" -#, fuzzy -msgid "Remove from launcher" -msgstr "Launcher から削除" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Launcher から削除" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Korean\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "시작 관리자에 유지" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "시작 관리자에 유지" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "끝내기" -#, fuzzy -msgid "Remove from launcher" -msgstr "시작 관리자에서 제거" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "시작 관리자에서 제거" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Norwegian Bokmal\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Behold i oppstartsprogram" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Behold i oppstartsprogram" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Avslutt" -#, fuzzy -msgid "Remove from launcher" -msgstr "Fjern fra oppstartsprogram" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Fjern fra oppstartsprogram" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Dutch\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Bewaren in starter" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Bewaren in starter" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Afsluiten" -#, fuzzy -msgid "Remove from launcher" -msgstr "Verwijderen uit starter" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Verwijderen uit starter" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Polish\n" @@ -18,69 +18,58 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Pozostaw w obszarze uruchamiania" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Pozostaw w obszarze uruchamiania" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Zamknij" -#, fuzzy -msgid "Remove from launcher" -msgstr "Usuń z obszaru uruchamiania" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Usuń z obszaru uruchamiania" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Portuguese\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Manter no Launcher" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Manter no Launcher" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Abandonar" -#, fuzzy -msgid "Remove from launcher" -msgstr "Remover do Launcher" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Remover do Launcher" diff --git a/po/pt_BR.po b/po/pt_BR.po index 22e0f49fa..4baa4ae10 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Brazilian Portuguese\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Manter no Inicializador" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Manter no Inicializador" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Sair" -#, fuzzy -msgid "Remove from launcher" -msgstr "Remover do Inicializador" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Remover do Inicializador" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Romanian\n" @@ -18,69 +18,58 @@ msgstr "" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " "20)) ? 1 : 2;\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Păstrează în programul de lansare" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Păstrează în programul de lansare" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Ieşire" -#, fuzzy -msgid "Remove from launcher" -msgstr "Îndepărtează din programul de lansare" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Îndepărtează din programul de lansare" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Russian\n" @@ -18,69 +18,58 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Оставить в модуле запуска" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Оставить в модуле запуска" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Выход" -#, fuzzy -msgid "Remove from launcher" -msgstr "Удалить из модуля запуска" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Удалить из модуля запуска" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Slovak\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Ponechať v aplikácii Launcher" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Ponechať v aplikácii Launcher" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Ukončiť" -#, fuzzy -msgid "Remove from launcher" -msgstr "Odstrániť z aplikácie Launcher" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Odstrániť z aplikácie Launcher" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Slovenian\n" @@ -18,69 +18,58 @@ msgstr "" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" "%100==4 ? 2 : 3);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Obdrži v zaganjalniku" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Obdrži v zaganjalniku" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Končaj" -#, fuzzy -msgid "Remove from launcher" -msgstr "Odstrani iz zaganjalnika" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Odstrani iz zaganjalnika" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Serbian\n" @@ -18,69 +18,58 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Zadrži u pokretaču" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Zadrži u pokretaču" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Napusti" -#, fuzzy -msgid "Remove from launcher" -msgstr "Ukloni iz pokretača" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Ukloni iz pokretača" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:36-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Swedish\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Behåll i startprogram" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Behåll i startprogram" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Avsluta" -#, fuzzy -msgid "Remove from launcher" -msgstr "Ta bort från startprogram" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Ta bort från startprogram" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:37-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Thai\n" @@ -16,69 +16,58 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "อยู่ในโปรแกรมเรียกทำงาน" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "อยู่ในโปรแกรมเรียกทำงาน" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "จบการทำงาน" -#, fuzzy -msgid "Remove from launcher" -msgstr "ออกจากโปรแกรมเรียกทำงาน" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "ออกจากโปรแกรมเรียกทำงาน" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:37-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Turkish\n" @@ -17,69 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "Başlatıcıda Tut" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "Başlatıcıda Tut" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "Çık" -#, fuzzy -msgid "Remove from launcher" -msgstr "Başlatıcıdan Kaldır" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "Başlatıcıdan Kaldır" diff --git a/po/unity.pot b/po/unity.pot index 279f8c526..8347a9a28 100644 --- a/po/unity.pot +++ b/po/unity.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2011-01-25 00:10-0500\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,67 +17,53 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -msgid "Keep in Launcher" -msgstr "" - -msgid "Remove from launcher" +msgid "Keep In Launcher" msgstr "" msgid "Quit" msgstr "" -#, c-format -msgid "See %u more results" +msgid "Open" msgstr "" -#. Load up the world -msgid "Web" +msgid "Eject" msgstr "" -msgid "Music" +msgid "Workspace Switcher" msgstr "" -msgid "Photos & Videos" +msgid "Find Media Apps" msgstr "" -msgid "Games" +msgid "Find Internet Apps" msgstr "" -msgid "Email & Chat" +msgid "Find More Apps" msgstr "" -msgid "Office" +msgid "Find Files" msgstr "" -msgid "Files & Folders" +msgid "Browse the Web" msgstr "" -msgid "Get New Apps" +msgid "View Photos" msgstr "" -msgid "Search" +msgid "Check Email" msgstr "" -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Listen to Music" msgstr "" msgid "Trash" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" -msgstr "" - -msgid "Open" +msgid "Empty Trash" msgstr "" -msgid "Empty Trash" +msgid "Empty all items from Trash?" msgstr "" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" diff --git a/po/zh_CN.po b/po/zh_CN.po index e691ac949..2205fd64d 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:37-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Chinese (simplified)\n" @@ -16,69 +16,58 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "保留在启动程序中" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "保留在启动程序中" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "退出" -#, fuzzy -msgid "Remove from launcher" -msgstr "从启动程序中删除" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "从启动程序中删除" diff --git a/po/zh_TW.po b/po/zh_TW.po index 53bfc03a5..8b945d7b1 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l 10n\n" "Report-Msgid-Bugs-To: ayatana-dev@lists.launchpad.net\n" -"POT-Creation-Date: 2010-11-02 23:58+0000\n" +"POT-Creation-Date: 2011-02-21 19:06+0100\n" "PO-Revision-Date: 2010-03-02 12:37-0500\n" "Last-Translator: Canonical OEM\n" "Language-Team: Chinese (traditional)\n" @@ -16,69 +16,58 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -msgid "Eject" +msgid "All items in the Trash will be permanently deleted." msgstr "" -msgid "Email & Chat" +msgid "Browse the Web" msgstr "" -msgid "Empty Trash" +msgid "Check Email" msgstr "" -msgid "Files & Folders" +msgid "Eject" msgstr "" -#. i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason -#, c-format -msgid "Files in trash: %d" +msgid "Empty Trash" msgstr "" -msgid "Games" +msgid "Empty all items from Trash?" msgstr "" -msgid "Get New Apps" +msgid "Find Files" msgstr "" -#, fuzzy -msgid "Keep in Launcher" -msgstr "保留在啟動程式中" +msgid "Find Internet Apps" +msgstr "" -msgid "Music" +msgid "Find Media Apps" msgstr "" -msgid "Office" +msgid "Find More Apps" msgstr "" -msgid "Open" +#, fuzzy +msgid "Keep In Launcher" +msgstr "保留在啟動程式中" + +msgid "Listen to Music" msgstr "" -msgid "Photos & Videos" +msgid "Open" msgstr "" msgid "Quit" msgstr "結束" -#, fuzzy -msgid "Remove from launcher" -msgstr "從啟動程式中刪除" - -msgid "Search" -msgstr "" - -#. i18n: This is meant to be used like Search $PLACES_NAME, so eg. -#. * 'Search Applications' -#. -#, c-format -msgid "Search %s" +msgid "Trash" msgstr "" -#, c-format -msgid "See %u more results" +msgid "View Photos" msgstr "" -msgid "Trash" +msgid "Workspace Switcher" msgstr "" -#. Load up the world -msgid "Web" -msgstr "" +#, fuzzy +#~ msgid "Remove from launcher" +#~ msgstr "從啟動程式中刪除" diff --git a/services/CMakeLists.txt b/services/CMakeLists.txt index 913ca1c35..5ce8c1942 100644 --- a/services/CMakeLists.txt +++ b/services/CMakeLists.txt @@ -2,7 +2,7 @@ # Panel Service # find_package(PkgConfig) -pkg_check_modules(SERVICE_DEPS REQUIRED gobject-2.0 gio-2.0 gtk+-2.0 gthread-2.0 indicator x11) +pkg_check_modules(SERVICE_DEPS REQUIRED gobject-2.0 gio-2.0 gtk+-2.0 gthread-2.0 indicator x11 gconf-2.0) execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} indicator --variable indicatordir OUTPUT_VARIABLE _indicatordir OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} indicator --variable iconsdir OUTPUT_VARIABLE _iconsdir OUTPUT_STRIP_TRAILING_WHITESPACE) diff --git a/services/panel-a11y.c b/services/panel-a11y.c index 0af1fe758..a1c4cec0f 100644 --- a/services/panel-a11y.c +++ b/services/panel-a11y.c @@ -16,15 +16,16 @@ * Authored by: Rodrigo Moya <rodrigo.moya@canonical.com> */ +#include <gconf/gconf-client.h> #include <gio/gio.h> + #include "panel-a11y.h" #include "panel-util-accessible.h" static gboolean a11y_initialized = FALSE; #define INIT_METHOD "gnome_accessibility_module_init" -#define DESKTOP_SCHEMA "org.gnome.desktop.interface" -#define ACCESSIBILITY_ENABLED_KEY "accessibility" +#define A11Y_GCONF_KEY "/desktop/gnome/interface/accessibility" #define AT_SPI_SCHEMA "org.a11y.atspi" #define ATK_BRIDGE_LOCATION_KEY "atk-bridge-location" @@ -53,16 +54,19 @@ has_gsettings_schema (const gchar *schema) static gboolean should_enable_a11y (void) { - GSettings *desktop_settings = NULL; + GConfClient *client = NULL; gboolean value = FALSE; + GError *error = NULL; - if (!has_gsettings_schema (DESKTOP_SCHEMA)) - return FALSE; - - desktop_settings = g_settings_new (DESKTOP_SCHEMA); - value = g_settings_get_boolean (desktop_settings, ACCESSIBILITY_ENABLED_KEY); - - g_object_unref (desktop_settings); + client = gconf_client_get_default (); + value = gconf_client_get_bool (client, A11Y_GCONF_KEY, &error); + if (error != NULL) + { + g_warning ("Error getting gconf variable %s, a11y disabled by default", + A11Y_GCONF_KEY); + g_error_free (error); + } + g_object_unref (client); return value; } diff --git a/src/DeviceLauncherIcon.cpp b/src/DeviceLauncherIcon.cpp index 4b31176e4..13e4b154b 100644 --- a/src/DeviceLauncherIcon.cpp +++ b/src/DeviceLauncherIcon.cpp @@ -60,42 +60,15 @@ DeviceLauncherIcon::UpdateDeviceIcon () { GIcon *icon; + gchar *icon_string; icon = g_volume_get_icon (_volume); - if (G_IS_THEMED_ICON (icon)) - { - const gchar * const *names; - - names = g_themed_icon_get_names (G_THEMED_ICON (icon)); - - if (names) - SetIconName (names[0]); - else - SetIconName (DEFAULT_ICON); - } - else if (G_IS_FILE_ICON (icon)) - { - GFile *file; - - file = g_file_icon_get_file (G_FILE_ICON (icon)); - if (file) - { - gchar *path; + icon_string = g_icon_to_string (icon); - path = g_file_get_path (file); - SetIconName (path); - - g_free (path); - } - else - SetIconName (DEFAULT_ICON); - } - else - { - SetIconName (DEFAULT_ICON); - } + SetIconName (icon_string); g_object_unref (icon); + g_free (icon_string); } SetQuirk (QUIRK_VISIBLE, true); @@ -122,7 +95,7 @@ DeviceLauncherIcon::OnMouseClick (int button) if (button == 1) { - Activate (); + ActivateLauncherIcon (); } } @@ -196,7 +169,7 @@ DeviceLauncherIcon::ShowMount (GMount *mount) } void -DeviceLauncherIcon::Activate () +DeviceLauncherIcon::ActivateLauncherIcon () { GMount *mount; gchar *name; @@ -273,7 +246,7 @@ DeviceLauncherIcon::Eject () void DeviceLauncherIcon::OnOpen (DbusmenuMenuitem *item, int time, DeviceLauncherIcon *self) { - self->Activate (); + self->ActivateLauncherIcon (); } void diff --git a/src/DeviceLauncherIcon.h b/src/DeviceLauncherIcon.h index 6c13e8a19..d966699a3 100644 --- a/src/DeviceLauncherIcon.h +++ b/src/DeviceLauncherIcon.h @@ -40,7 +40,7 @@ protected: std::list<DbusmenuMenuitem *> GetMenus (); private: - void Activate (); + void ActivateLauncherIcon (); void ShowMount (GMount *mount); void Eject (); static void OnOpen (DbusmenuMenuitem *item, int time, DeviceLauncherIcon *self); diff --git a/src/IconTexture.cpp b/src/IconTexture.cpp index 580268636..3326d4ee7 100644 --- a/src/IconTexture.cpp +++ b/src/IconTexture.cpp @@ -34,17 +34,23 @@ IconTexture::IconTexture (const char *icon_name, unsigned int size) : TextureArea (NUX_TRACKER_LOCATION), _icon_name (NULL), - _size (size) + _size (size), + _texture_cached (NULL), + _texture_width (0), + _texture_height (0) { _icon_name = g_strdup (icon_name ? icon_name : DEFAULT_ICON); - LoadIcon (); + if (!g_strcmp0 (_icon_name, "") == 0) + LoadIcon (); } IconTexture::~IconTexture () { g_free (_icon_name); - _texture_cached->UnReference (); + + if (_texture_cached) + _texture_cached->UnReference (); } void @@ -53,7 +59,6 @@ IconTexture::SetByIconName (const char *icon_name, unsigned int size) g_free (_icon_name); _icon_name = g_strdup (icon_name); _size = size; - LoadIcon (); } @@ -87,8 +92,6 @@ IconTexture::LoadIcon () _size, sigc::mem_fun (this, &IconTexture::IconLoaded)); } - - SetMinMaxSize (_size, _size); } void @@ -101,37 +104,29 @@ IconTexture::CreateTextureCallback (const char *texid, int width, int height, nu void IconTexture::Refresh (GdkPixbuf *pixbuf) { - // try and get a texture from the texture cache - char *id = g_strdup_printf ("IconTexture.%s", _icon_name); - _pixbuf_cached = pixbuf; TextureCache *cache = TextureCache::GetDefault (); - nux::BaseTexture * texture2D = cache->FindTexture (id, _size, _size, - sigc::mem_fun (this, &IconTexture::CreateTextureCallback)); + char *id = NULL; + + _pixbuf_cached = pixbuf; + + // Cache the pixbuf dimensions so we scale correctly + _texture_width = gdk_pixbuf_get_width (pixbuf); + _texture_height = gdk_pixbuf_get_height (pixbuf); + + // Try and get a texture from the texture cache + id = g_strdup_printf ("IconTexture.%s", _icon_name); + if (_texture_cached) + _texture_cached->UnReference (); + + _texture_cached = cache->FindTexture (id, + _texture_width, + _texture_height, + sigc::mem_fun (this, &IconTexture::CreateTextureCallback)); + _texture_cached->Reference (); - nux::TexCoordXForm texxform; - texxform.SetTexCoordType (nux::TexCoordXForm::OFFSET_SCALE_COORD); - texxform.SetWrap (nux::TEXWRAP_CLAMP_TO_BORDER, nux::TEXWRAP_CLAMP_TO_BORDER); - - nux::IntrusiveSP<nux::IOpenGLBaseTexture> dev = texture2D->GetDeviceTexture(); - dev->SetFiltering (GL_LINEAR, GL_LINEAR); - - nux::ROPConfig rop; - rop.Blend = true; - rop.SrcBlend = GL_ONE; - rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA; - nux::TextureLayer* texture_layer = new nux::TextureLayer (dev, - texxform, - nux::Color::White, - true, - rop); - SetPaintLayer(texture_layer); - - texture2D->Reference (); - _texture_cached = texture2D; - - SetMinMaxSize (gdk_pixbuf_get_width (pixbuf) * (_size/(float)gdk_pixbuf_get_height (pixbuf)), - _size); QueueDraw (); + + g_free (id); } void @@ -147,6 +142,40 @@ IconTexture::IconLoaded (const char *icon_name, guint size, GdkPixbuf *pixbuf) } } +void +IconTexture::Draw (nux::GraphicsEngine& GfxContext, bool force_draw) +{ + nux::Geometry geo = GetGeometry (); + + GfxContext.PushClippingRectangle (geo); + + if (_texture_cached) + { + nux::TexCoordXForm texxform; + texxform.SetTexCoordType (nux::TexCoordXForm::OFFSET_SCALE_COORD); + texxform.SetWrap (nux::TEXWRAP_CLAMP_TO_BORDER, nux::TEXWRAP_CLAMP_TO_BORDER); + + GfxContext.QRP_1Tex (geo.x + ((geo.width - _texture_width)/2), + geo.y + ((geo.height - _texture_height)/2), + _texture_width, + _texture_height, + _texture_cached->GetDeviceTexture (), + texxform, + nux::Color::White); + } + + GfxContext.PopClippingRectangle (); +} + +void +IconTexture::GetTextureSize (int *width, int *height) +{ + if (width) + *width = _texture_width; + if (height) + *height = _texture_height; +} + const gchar* IconTexture::GetName () { diff --git a/src/IconTexture.h b/src/IconTexture.h index 0365760c3..da49fcdb2 100644 --- a/src/IconTexture.h +++ b/src/IconTexture.h @@ -35,12 +35,15 @@ public: void SetByIconName (const char *icon_name, unsigned int size); void SetByFilePath (const char *file_path, unsigned int size); + void GetTextureSize (int *width, int *height); protected: const gchar* GetName (); void AddProperties (GVariantBuilder *builder); private: + void Draw (nux::GraphicsEngine& GfxContext, bool force_draw); + void CreateTextureCallback (const char *texid, int width, int height, nux::BaseTexture **texture); void LoadIcon (); void Refresh (GdkPixbuf *pixbuf); @@ -49,8 +52,10 @@ private: char *_icon_name; unsigned int _size; - GdkPixbuf *_pixbuf_cached; // not guarunteed outside of a IconLoader callback + GdkPixbuf *_pixbuf_cached; nux::BaseTexture *_texture_cached; + int _texture_width; + int _texture_height; }; #endif // ICON_TEXTURE_H diff --git a/src/Launcher.cpp b/src/Launcher.cpp index a7f752f01..c18b535f2 100644 --- a/src/Launcher.cpp +++ b/src/Launcher.cpp @@ -55,11 +55,24 @@ NUX_IMPLEMENT_OBJECT_TYPE (Launcher); int TimeDelta (struct timespec const *x, struct timespec const *y) - { return ((x->tv_sec - y->tv_sec) * 1000) + ((x->tv_nsec - y->tv_nsec) / 1000000); } +void SetTimeBack (struct timespec *timeref, int remove) +{ + timeref->tv_sec -= remove / 1000; + remove = remove % 1000; + + if (remove > timeref->tv_nsec / 1000000) + { + timeref->tv_sec--; + timeref->tv_nsec += 1000000000; + } + timeref->tv_nsec -= remove * 1000000; +} + + /* Use this shader to pass vertices in screen coordinates in the C++ code and compute use the fragment shader to perform the texture perspective correct division. @@ -191,7 +204,7 @@ Launcher::Launcher (nux::BaseWindow* parent, OnMouseWheel.connect (sigc::mem_fun (this, &Launcher::RecvMouseWheel)); OnKeyPressed.connect (sigc::mem_fun (this, &Launcher::RecvKeyPressed)); OnEndFocus.connect (sigc::mem_fun (this, &Launcher::exitKeyNavMode)); - + QuicklistManager::Default ()->quicklist_opened.connect (sigc::mem_fun(this, &Launcher::RecvQuicklistOpened)); QuicklistManager::Default ()->quicklist_closed.connect (sigc::mem_fun(this, &Launcher::RecvQuicklistClosed)); @@ -279,6 +292,10 @@ Launcher::Launcher (nux::BaseWindow* parent, _arrow_rtl = nux::CreateTexture2DFromFile (PKGDATADIR"/launcher_arrow_rtl.png", -1, true); _arrow_empty_rtl = nux::CreateTexture2DFromFile (PKGDATADIR"/launcher_arrow_outline_rtl.png", -1, true); + for (int i = 0; i < MAX_SUPERKEY_LABELS - 1; i++) + _superkey_labels[i] = cairoToTexture2D ((char) ('1' + i), LAUNCHER_ICON_SIZE, LAUNCHER_ICON_SIZE); + _superkey_labels[9] = cairoToTexture2D ((char) ('0'), LAUNCHER_ICON_SIZE, LAUNCHER_ICON_SIZE); + _enter_y = 0; _dnd_security = 15; _launcher_drag_delta = 0; @@ -338,7 +355,11 @@ Launcher::Launcher (nux::BaseWindow* parent, Launcher::~Launcher() { - + for (int i = 0; i < MAX_SUPERKEY_LABELS; i++) + { + if (_superkey_labels[i]) + _superkey_labels[i]->UnReference (); + } } /* Introspection */ @@ -349,9 +370,122 @@ Launcher::GetName () } void -Launcher::startKeyNavMode () -{ +Launcher::DrawRoundedRectangle (cairo_t* cr, + double aspect, + double x, + double y, + double cornerRadius, + double width, + double height) +{ + double radius = cornerRadius / aspect; + + // top-left, right of the corner + cairo_move_to (cr, x + radius, y); + // top-right, left of the corner + cairo_line_to (cr, x + width - radius, y); + + // top-right, below the corner + cairo_arc (cr, + x + width - radius, + y + radius, + radius, + -90.0f * G_PI / 180.0f, + 0.0f * G_PI / 180.0f); + + // bottom-right, above the corner + cairo_line_to (cr, x + width, y + height - radius); + + // bottom-right, left of the corner + cairo_arc (cr, + x + width - radius, + y + height - radius, + radius, + 0.0f * G_PI / 180.0f, + 90.0f * G_PI / 180.0f); + + // bottom-left, right of the corner + cairo_line_to (cr, x + radius, y + height); + + // bottom-left, above the corner + cairo_arc (cr, + x + radius, + y + height - radius, + radius, + 90.0f * G_PI / 180.0f, + 180.0f * G_PI / 180.0f); + + // top-left, right of the corner + cairo_arc (cr, + x + radius, + y + radius, + radius, + 180.0f * G_PI / 180.0f, + 270.0f * G_PI / 180.0f); +} + +nux::BaseTexture* +Launcher::cairoToTexture2D (const char label, int width, int height) +{ + nux::BaseTexture* texture = NULL; + nux::CairoGraphics* cg = new nux::CairoGraphics (CAIRO_FORMAT_ARGB32, + width, + height); + cairo_t* cr = cg->GetContext (); + PangoLayout* layout = NULL; + PangoContext* pangoCtx = NULL; + PangoFontDescription* desc = NULL; + GtkSettings* settings = gtk_settings_get_default (); // not ref'ed + gchar* fontName = NULL; + double label_x = 18.0f; + double label_y = 18.0f; + double label_w = 18.0f; + double label_h = 18.0f; + double label_r = 3.0f; + + cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); + cairo_paint (cr); + cairo_scale (cr, 1.0f, 1.0f); + cairo_set_operator (cr, CAIRO_OPERATOR_OVER); + DrawRoundedRectangle (cr, 1.0f, label_x, label_y, label_r, label_w, label_h); + cairo_set_source_rgba (cr, 0.0f, 0.0f, 0.0f, 0.65f); + cairo_fill (cr); + + layout = pango_cairo_create_layout (cr); + g_object_get (settings, "gtk-font-name", &fontName, NULL); + desc = pango_font_description_from_string (fontName); + pango_font_description_set_size (desc, 11 * PANGO_SCALE); + pango_layout_set_font_description (layout, desc); + pango_layout_set_text (layout, &label, 1); + pangoCtx = pango_layout_get_context (layout); // is not ref'ed + + PangoRectangle logRect; + PangoRectangle inkRect; + pango_layout_get_extents (layout, &inkRect, &logRect); + + /* position and paint text */ + cairo_set_source_rgba (cr, 1.0f, 1.0f, 1.0f, 1.0f); + double x = label_x - ((logRect.width / PANGO_SCALE) - label_w) / 2.0f; + double y = label_y - ((logRect.height / PANGO_SCALE) - label_h) / 2.0f - 1; + cairo_move_to (cr, x, y); + pango_cairo_show_layout (cr, layout); + + nux::NBitmapData* bitmap = cg->GetBitmap (); + texture = nux::GetThreadGLDeviceFactory()->CreateSystemCapableTexture (); + texture->Update (bitmap); + delete bitmap; + delete cg; + g_object_unref (layout); + pango_font_description_free (desc); + g_free (fontName); + + return texture; +} + +void +Launcher::startKeyNavMode () +{ _navmod_show_launcher = true; EnsureHiddenState (); @@ -363,6 +497,17 @@ Launcher::startKeyNavMode () } void +Launcher::leaveKeyNavMode () +{ + _last_icon_index = _current_icon_index; + _current_icon_index = -1; + QueueDraw (); + ubus_server_send_message (ubus_server_get_default (), + UBUS_LAUNCHER_END_KEY_NAV, + NULL); +} + +void Launcher::exitKeyNavMode () { if (!_navmod_show_launcher) @@ -373,10 +518,10 @@ Launcher::exitKeyNavMode () _last_icon_index = _current_icon_index; _current_icon_index = -1; + QueueDraw (); ubus_server_send_message (ubus_server_get_default (), - UBUS_LAUNCHER_EXIT_KEY_NAV, + UBUS_LAUNCHER_END_KEY_NAV, NULL); - NeedRedraw (); } void @@ -410,7 +555,7 @@ void Launcher::SetMousePosition (int x, int y) bool Launcher::MouseBeyondDragThreshold () { - if (_launcher_action_state == ACTION_DRAG_ICON) + if (GetActionState () == ACTION_DRAG_ICON) return _mouse_position.x > GetGeometry ().width + _icon_size / 2; return false; } @@ -437,17 +582,19 @@ float Launcher::DnDStartProgress (struct timespec const ¤t) float Launcher::AutohideProgress (struct timespec const ¤t) { - // bfb position progress - if (_mouse_inside_trigger) + // bfb position progress. Go from GetAutohidePositionMin() -> GetAutohidePositionMax() linearly + if (_mouse_inside_trigger && !_mouseover_launcher_locked) { - /* + + // "dead" zone + if ((_trigger_mouse_position.x < 2) && (_trigger_mouse_position.y < 2)) + return GetAutohidePositionMin (); + + /* * most of the mouse movement should be done by the inferior part * of the launcher, so prioritize this one */ - - if(_mouseover_launcher_locked || ((_trigger_mouse_position.x == 0) && (_trigger_mouse_position.y == 0))) - return 0.0f; - + float _max_size_on_position; float position_on_border = _trigger_mouse_position.x * _trigger_height / _trigger_mouse_position.y; @@ -459,13 +606,14 @@ float Launcher::AutohideProgress (struct timespec const ¤t) _max_size_on_position = pow(pow(position_on_border, 2) + pow(_trigger_width, 2), 0.5); } // only triggered on _hidden = false, no need for check - return CLAMP (pow(pow(_trigger_mouse_position.x, 2) + pow(_trigger_mouse_position.y, 2), 0.5) / _max_size_on_position, 0.0f, 1.0f); + float _position_min = GetAutohidePositionMin (); + return pow(pow(_trigger_mouse_position.x, 2) + pow(_trigger_mouse_position.y, 2), 0.5) / _max_size_on_position * (GetAutohidePositionMax () - _position_min) + _position_min; } - // time-based progress + // time-based progress (full scale or finish the TRIGGER_AUTOHIDE_MIN -> 0.00f on bfb) else { - float animation_progress; + float animation_progress; animation_progress = CLAMP ((float) (TimeDelta (¤t, &_times[TIME_AUTOHIDE])) / (float) ANIM_DURATION_SHORT, 0.0f, 1.0f); if (_hidden) return animation_progress; @@ -608,21 +756,30 @@ void Launcher::SetTimeStruct (struct timespec *timer, struct timespec *sister, i if (diff < sister_relation) { int remove = sister_relation - diff; - current.tv_sec -= remove / 1000; - remove = remove % 1000; - - if (remove > current.tv_nsec / 1000000) - { - current.tv_sec--; - current.tv_nsec += 1000000000; - } - current.tv_nsec -= remove * 1000000; + SetTimeBack (¤t, remove); } } timer->tv_sec = current.tv_sec; timer->tv_nsec = current.tv_nsec; } +/* Min is when you lock the trigger */ +float Launcher::GetAutohidePositionMin () +{ + if (_autohide_animation == SLIDE_ONLY) + return 0.55f; + else + return 0.25f; +} +/* Max is the initial state */ +float Launcher::GetAutohidePositionMax () +{ + if (_autohide_animation == SLIDE_ONLY) + return 1.00f; + else + return 0.75f; +} + float IconVisibleProgress (LauncherIcon *icon, struct timespec const ¤t) { @@ -913,7 +1070,7 @@ void Launcher::FillRenderArg (LauncherIcon *icon, if (MouseBeyondDragThreshold ()) arg.stick_thingy = true; - if (_launcher_action_state == ACTION_DRAG_ICON || + if (GetActionState () == ACTION_DRAG_ICON || (_drag_window && _drag_window->Animating ()) || dynamic_cast<SpacerLauncherIcon *> (icon)) arg.skip = true; @@ -1030,7 +1187,7 @@ void Launcher::RenderArgs (std::list<Launcher::RenderArg> &launcher_args, else if (_launcher_drag_delta < min) delta_y = min + DragLimiter (delta_y - min); - if (_launcher_action_state != ACTION_DRAG_LAUNCHER) + if (GetActionState () != ACTION_DRAG_LAUNCHER) { float dnd_progress = DnDExitProgress (current); @@ -1060,18 +1217,7 @@ void Launcher::RenderArgs (std::list<Launcher::RenderArg> &launcher_args, if (_autohide_animation == FADE_ONLY || (_autohide_animation == FADE_SLIDE && _mouse_inside_trigger)) - { - if (autohide_progress > 0.0f) - { - if (_mouse_inside_trigger) - { - if (!_mouseover_launcher_locked) - *launcher_alpha = 1.0f - (autohide_progress / 1.5f); - } - else - *launcher_alpha = 1.0f - autohide_progress; - } - } + *launcher_alpha = 1.0f - autohide_progress; else { if (autohide_progress > 0.0f) @@ -1081,8 +1227,14 @@ void Launcher::RenderArgs (std::list<Launcher::RenderArg> &launcher_args, * as we can go back and for. We have to lock the launcher manually changing * the _hidden state then */ - if (autohide_progress == 0.0f && _mouse_inside_trigger && !_mouseover_launcher_locked) + float _position_min = GetAutohidePositionMin (); + if (autohide_progress == _position_min && _mouse_inside_trigger && !_mouseover_launcher_locked) + { ForceHiddenState (false); // lock the launcher + _times[TIME_AUTOHIDE] = current; + SetTimeBack (&_times[TIME_AUTOHIDE], ANIM_DURATION_SHORT * _position_min); + SetTimeStruct (&_times[TIME_AUTOHIDE], &_times[TIME_AUTOHIDE], ANIM_DURATION_SHORT); // finish the animation + } } float drag_hide_progress = DragHideProgress (current); @@ -1154,12 +1306,23 @@ void Launcher::RenderArgs (std::list<Launcher::RenderArg> &launcher_args, void Launcher::StartKeyShowLauncher () { _super_show_launcher = true; + QueueDraw (); + SetTimeStruct (&_times[TIME_TAP_SUPER], NULL, ANIM_DURATION_SHORT); EnsureHiddenState (); } void Launcher::EndKeyShowLauncher () { + struct timespec current; + clock_gettime (CLOCK_MONOTONIC, ¤t); + _super_show_launcher = false; + QueueDraw (); + + // it's a tap on super + if (TimeDelta (¤t, &_times[TIME_TAP_SUPER]) < SUPER_TAP_DURATION) + ubus_server_send_message (ubus_server_get_default (), UBUS_DASH_EXTERNAL_ACTIVATION, NULL); + SetupAutohideTimer (); } @@ -1237,9 +1400,9 @@ void Launcher::SetHidden (bool hidden) _hidden = hidden; SetTimeStruct (&_times[TIME_AUTOHIDE], &_times[TIME_AUTOHIDE], ANIM_DURATION_SHORT); - _parent->EnableInputWindow(!hidden, "launcher"); + _parent->EnableInputWindow(!hidden, "launcher", false, false); - if (!hidden && _launcher_action_state == ACTION_DRAG_EXTERNAL) + if (!hidden && GetActionState () == ACTION_DRAG_EXTERNAL) ProcessDndLeave (); EnsureAnimation (); @@ -1263,7 +1426,7 @@ Launcher::EnsureHiddenState () bool required_for_external_purpose = _super_show_launcher || _placeview_show_launcher || _navmod_show_launcher || QuicklistManager::Default ()->Current() || PluginAdapter::Default ()->IsScaleActive (); - bool in_must_be_open_mode = _launcher_action_state != ACTION_NONE || _dnd_window_is_mapped; + bool in_must_be_open_mode = GetActionState () != ACTION_NONE || _dnd_window_is_mapped; bool must_be_hidden = _hide_on_drag_hover && _hidemode != LAUNCHER_HIDE_NEVER; @@ -1419,7 +1582,7 @@ void Launcher::SetHideMode (LauncherHideMode hidemode) } else { - _parent->EnableInputWindow(true, "launcher"); + _parent->EnableInputWindow(true, "launcher", false, false); g_timeout_add (1000, &Launcher::StrutHack, this); _parent->InputWindowEnableStruts(true); } @@ -1495,10 +1658,25 @@ Launcher::GetUrgentAnimation () } void +Launcher::SetActionState (LauncherActionState actionstate) +{ + _launcher_action_state = actionstate; + + if (_navmod_show_launcher) + exitKeyNavMode (); +} + +Launcher::LauncherActionState +Launcher::GetActionState () +{ + return _launcher_action_state; +} + +void Launcher::EnsureHoverState () { if (_mouse_inside_launcher || _mouse_inside_trigger || - QuicklistManager::Default ()->Current() || _launcher_action_state != ACTION_NONE) + QuicklistManager::Default ()->Current() || GetActionState () != ACTION_NONE) { SetHover (); } @@ -1533,7 +1711,7 @@ void Launcher::UnsetHover () bool Launcher::MouseOverTopScrollArea () { - if (_launcher_action_state == ACTION_NONE) + if (GetActionState () == ACTION_NONE) return _mouse_inside_trigger; return _mouse_position.y < 0; @@ -1542,7 +1720,7 @@ bool Launcher::MouseOverTopScrollArea () bool Launcher::MouseOverTopScrollExtrema () { // since we are not dragging the trigger will pick up events - if (_launcher_action_state == ACTION_NONE) + if (GetActionState () == ACTION_NONE) return _trigger_mouse_position.y == 0; return _mouse_position.y == 0 - _parent->GetGeometry ().y; @@ -1563,7 +1741,7 @@ gboolean Launcher::OnScrollTimeout (gpointer data) Launcher *self = (Launcher*) data; nux::Geometry geo = self->GetGeometry (); - if (!self->_hovered || (self->_launcher_action_state != ACTION_DRAG_ICON && self->_launcher_action_state != ACTION_DRAG_EXTERNAL)) + if (!self->_hovered || (self->GetActionState () != ACTION_DRAG_ICON && self->GetActionState () != ACTION_DRAG_EXTERNAL)) return TRUE; if (self->MouseOverTopScrollArea ()) @@ -1628,6 +1806,10 @@ void Launcher::OnIconAdded (LauncherIcon *icon) // needs to be disconnected icon->needs_redraw.connect (sigc::mem_fun(this, &Launcher::OnIconNeedsRedraw)); + guint64 shortcut = icon->GetShortcut (); + if (shortcut != 0 && !g_ascii_isdigit ((gchar) shortcut)) + icon->SetSuperkeyLabel (cairoToTexture2D ((gchar) shortcut, LAUNCHER_ICON_SIZE, LAUNCHER_ICON_SIZE)); + AddChild (icon); } @@ -2036,6 +2218,51 @@ void Launcher::DrawRenderArg (nux::GraphicsEngine& GfxContext, RenderArg const & nux::Color (0xFFFFFFFF), arg.alpha, arg.icon->_xform_coords["Glow"]); + + /* draw superkey-shortcut label */ + if (_super_show_launcher) + { + guint64 shortcut = arg.icon->GetShortcut (); + + /* deal with dynamic labels for places, which can be set via the locale */ + if (shortcut != 0 && !g_ascii_isdigit ((gchar) shortcut)) + { + RenderIcon (GfxContext, + arg, + arg.icon->GetSuperkeyLabel ()->GetDeviceTexture (), + nux::Color (0xFFFFFFFF), + arg.alpha, + arg.icon->_xform_coords["Tile"]); + } + else + { + /* deal with the hardcoded labels used for the first 10 icons on the launcher */ + gchar key = (gchar) shortcut; + int index = -1; + + switch (key) + { + case '1': index = 0; break; + case '2': index = 1; break; + case '3': index = 2; break; + case '4': index = 3; break; + case '5': index = 4; break; + case '6': index = 5; break; + case '7': index = 6; break; + case '8': index = 7; break; + case '9': index = 8; break; + case '0': index = 9; break; + } + + if (index != -1) + RenderIcon (GfxContext, + arg, + _superkey_labels[index]->GetDeviceTexture (), + nux::Color (0xFFFFFFFF), + arg.alpha, + arg.icon->_xform_coords["Tile"]); + } + } } void Launcher::DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw) @@ -2173,9 +2400,6 @@ void Launcher::StartIconDrag (LauncherIcon *icon) _drag_window->UnReference (); _drag_window = NULL; } - - if (_navmod_show_launcher) - exitKeyNavMode (); _offscreen_drag_texture = nux::GetThreadGLDeviceFactory()->CreateSystemCapableDeviceTexture (_icon_size, _icon_size, 1, nux::BITFMT_R8G8B8A8); _drag_window = new LauncherDragWindow (_offscreen_drag_texture); @@ -2236,7 +2460,7 @@ void Launcher::RecvMouseUp(int x, int y, unsigned long button_flags, unsigned lo SetMousePosition (x, y); nux::Geometry geo = GetGeometry (); - if (_launcher_action_state != ACTION_NONE && !geo.IsInside(nux::Point(x, y))) + if (GetActionState () != ACTION_NONE && !geo.IsInside(nux::Point(x, y))) { // we are no longer hovered EnsureHoverState (); @@ -2244,10 +2468,10 @@ void Launcher::RecvMouseUp(int x, int y, unsigned long button_flags, unsigned lo MouseUpLogic (x, y, button_flags, key_flags); - if (_launcher_action_state == ACTION_DRAG_ICON) + if (GetActionState () == ACTION_DRAG_ICON) EndIconDrag (); - _launcher_action_state = ACTION_NONE; + SetActionState (ACTION_NONE); _dnd_delta_x = 0; _dnd_delta_y = 0; _last_button_press = 0; @@ -2264,7 +2488,7 @@ void Launcher::RecvMouseDrag(int x, int y, int dx, int dy, unsigned long button_ if (nux::Abs (_dnd_delta_y) < 15 && nux::Abs (_dnd_delta_x) < 15 && - _launcher_action_state == ACTION_NONE) + GetActionState () == ACTION_NONE) return; if (_icon_under_mouse) @@ -2274,14 +2498,14 @@ void Launcher::RecvMouseDrag(int x, int y, int dx, int dy, unsigned long button_ _icon_under_mouse = 0; } - if (_launcher_action_state == ACTION_NONE) + if (GetActionState () == ACTION_NONE) { SetTimeStruct (&_times[TIME_DRAG_START]); if (nux::Abs (_dnd_delta_y) >= nux::Abs (_dnd_delta_x)) { _launcher_drag_delta += _dnd_delta_y; - _launcher_action_state = ACTION_DRAG_LAUNCHER; + SetActionState (ACTION_DRAG_LAUNCHER); } else { @@ -2292,17 +2516,17 @@ void Launcher::RecvMouseDrag(int x, int y, int dx, int dy, unsigned long button_ if (drag_icon && (_last_button_press == 1) && _model->IconHasSister (drag_icon)) { StartIconDrag (drag_icon); - _launcher_action_state = ACTION_DRAG_ICON; + SetActionState (ACTION_DRAG_ICON); UpdateDragWindowPosition (x, y); } } } - else if (_launcher_action_state == ACTION_DRAG_LAUNCHER) + else if (GetActionState () == ACTION_DRAG_LAUNCHER) { _launcher_drag_delta += dy; } - else if (_launcher_action_state == ACTION_DRAG_ICON) + else if (GetActionState () == ACTION_DRAG_ICON) { UpdateDragWindowPosition (x, y); } @@ -2326,7 +2550,7 @@ void Launcher::RecvMouseLeave(int x, int y, unsigned long button_flags, unsigned SetMousePosition (x, y); _mouse_inside_launcher = false; - if (_launcher_action_state == ACTION_NONE) + if (GetActionState () == ACTION_NONE) EnsureHoverState (); // exit immediatly on action and mouse leaving the launcher @@ -2370,15 +2594,29 @@ void Launcher::RecvMouseWheel(int x, int y, int wheel_delta, unsigned long butto } void +Launcher::CheckSuperShortcutPressed (unsigned int key_sym, + unsigned long key_code, + unsigned long key_state) +{ + if (_super_show_launcher) + { + RecvKeyPressed (key_sym, key_code, key_state); + QueueDraw (); + } +} + +void Launcher::RecvKeyPressed (unsigned int key_sym, unsigned long key_code, unsigned long key_state) { + LauncherModel::iterator it; + switch (key_sym) { // up (move selection up or go to global-menu if at top-most icon) - case XK_Up: + case NUX_VK_UP: if (_current_icon_index > 0) _current_icon_index--; else @@ -2390,7 +2628,7 @@ Launcher::RecvKeyPressed (unsigned int key_sym, break; // down (move selection down and unfold launcher if needed) - case XK_Down: + case NUX_VK_DOWN: if (_current_icon_index < _model->Size ()) { _current_icon_index++; @@ -2399,8 +2637,8 @@ Launcher::RecvKeyPressed (unsigned int key_sym, break; // esc/left (close quicklist or exit laucher key-focus) - case XK_Left: - case XK_Escape: + case NUX_VK_LEFT: + case NUX_VK_ESCAPE: // hide again exitKeyNavMode (); break; @@ -2410,60 +2648,59 @@ Launcher::RecvKeyPressed (unsigned int key_sym, if (key_state & NUX_STATE_SHIFT) { { - LauncherModel::iterator it; - int i; - // open quicklist of currently selected icon - for (it = _model->begin (), i = 0; it != _model->end (); it++, i++) - if (i == _current_icon_index) - (*it)->OpenQuicklist (); + it = _model->at (_current_icon_index); + if (it != (LauncherModel::iterator)NULL) + (*it)->OpenQuicklist (true); } - exitKeyNavMode (); + leaveKeyNavMode (); } break; - case XK_Right: + case NUX_VK_RIGHT: { - LauncherModel::iterator it; - int i; - // open quicklist of currently selected icon - for (it = _model->begin (), i = 0; it != _model->end (); it++, i++) - if (i == _current_icon_index) - (*it)->OpenQuicklist (); + it = _model->at (_current_icon_index); + if (it != (LauncherModel::iterator)NULL) + (*it)->OpenQuicklist (true); } - exitKeyNavMode (); + leaveKeyNavMode (); break; // <SPACE> (open a new instance) - case XK_space: + case NUX_VK_SPACE: { - LauncherModel::iterator it; - int i; - // start currently selected icon - for (it = _model->begin (), i = 0; it != _model->end (); it++, i++) - if (i == _current_icon_index) - (*it)->OpenInstance (); + it = _model->at (_current_icon_index); + if (it != (LauncherModel::iterator)NULL) + (*it)->OpenInstance (); } - exitKeyNavMode (); + leaveKeyNavMode (); break; // <RETURN> (start/activate currently selected icon) - case XK_Return: + case NUX_VK_ENTER: { - LauncherModel::iterator it; - int i; - // start currently selected icon - for (it = _model->begin (), i = 0; it != _model->end (); it++, i++) - if (i == _current_icon_index) - (*it)->Activate (); + it = _model->at (_current_icon_index); + if (it != (LauncherModel::iterator)NULL) + (*it)->Activate (); } - exitKeyNavMode (); + leaveKeyNavMode (); break; - + + // Shortcut to start launcher icons default: + { + int i; + for (it = _model->begin (), i = 0; it != _model->end (); it++, i++) + { + if ((*it)->GetShortcut () == key_sym) + (*it)->Activate (); + } + + + } break; } } @@ -2486,8 +2723,8 @@ void Launcher::RecvQuicklistClosed (QuicklistView *quicklist) void Launcher::EventLogic () { - if (_launcher_action_state == ACTION_DRAG_ICON || - _launcher_action_state == ACTION_DRAG_LAUNCHER) + if (GetActionState () == ACTION_DRAG_ICON || + GetActionState () == ACTION_DRAG_LAUNCHER) return; LauncherIcon* launcher_icon = 0; @@ -2534,7 +2771,7 @@ void Launcher::MouseUpLogic (int x, int y, unsigned long button_flags, unsigned { _icon_mouse_down->MouseUp.emit (nux::GetEventButton (button_flags)); - if (_launcher_action_state == ACTION_NONE) + if (GetActionState () == ACTION_NONE) _icon_mouse_down->MouseClick.emit (nux::GetEventButton (button_flags)); } @@ -2543,7 +2780,7 @@ void Launcher::MouseUpLogic (int x, int y, unsigned long button_flags, unsigned launcher_icon->MouseUp.emit (nux::GetEventButton (button_flags)); } - if (_launcher_action_state == ACTION_DRAG_LAUNCHER) + if (GetActionState () == ACTION_DRAG_LAUNCHER) { SetTimeStruct (&_times[TIME_DRAG_END]); } @@ -3005,10 +3242,11 @@ Launcher::ProcessDndEnter () void Launcher::ProcessDndLeave () { - _launcher_action_state = ACTION_NONE; _mouse_inside_launcher = false; _drag_edge_touching = false; - + + SetActionState (ACTION_NONE); + if (!_drag_data.empty ()) { std::list<char *>::iterator it; @@ -3122,7 +3360,7 @@ Launcher::ProcessDndMove (int x, int y, std::list<char *> mimes) if (!_mouse_inside_launcher) { // only set hover once we know our first x/y - _launcher_action_state = ACTION_DRAG_EXTERNAL; + SetActionState (ACTION_DRAG_EXTERNAL); _mouse_inside_launcher = true; LauncherModel::iterator it; diff --git a/src/Launcher.h b/src/Launcher.h index 447c72991..3801a0639 100644 --- a/src/Launcher.h +++ b/src/Launcher.h @@ -38,6 +38,11 @@ #define ANIM_DURATION 200 #define ANIM_DURATION_LONG 350 +#define SUPER_TAP_DURATION 250 + +#define MAX_SUPERKEY_LABELS 10 +#define LAUNCHER_ICON_SIZE 54 + class LauncherModel; class QuicklistView; class LauncherIcon; @@ -121,6 +126,8 @@ public: void SetAutoHideAnimation (AutoHideAnimation animation); AutoHideAnimation GetAutoHideAnimation (); + void CheckSuperShortcutPressed (unsigned int key_sym, unsigned long key_code, unsigned long key_state); + nux::BaseWindow* GetParent () { return _parent; }; static void SetTimeStruct (struct timespec *timer, struct timespec *sister = 0, int sister_relation = 0); @@ -137,10 +144,10 @@ public: virtual void RecvQuicklistOpened (QuicklistView *quicklist); virtual void RecvQuicklistClosed (QuicklistView *quicklist); - void startKeyNavMode (); void exitKeyNavMode (); + void leaveKeyNavMode (); sigc::signal<void, char *, LauncherIcon *> launcher_dropped; protected: @@ -170,6 +177,7 @@ private: TIME_DRAG_THRESHOLD, TIME_AUTOHIDE, TIME_DRAG_EDGE_TOUCH, + TIME_TAP_SUPER, TIME_LAST } LauncherActionTimes; @@ -216,6 +224,9 @@ private: bool IconNeedsAnimation (LauncherIcon *icon, struct timespec const ¤t); bool AnimationInProgress (); + void SetActionState (LauncherActionState actionstate); + LauncherActionState GetActionState(); + void EnsureHoverState (); void EnsureHiddenState (); void EnsureAnimation (); @@ -325,6 +336,9 @@ private: void StartIconDrag (LauncherIcon *icon); void EndIconDrag (); void UpdateDragWindowPosition (int x, int y); + + float GetAutohidePositionMin (); + float GetAutohidePositionMax (); virtual void PreLayoutManagement(); virtual long PostLayoutManagement(long LayoutResult); @@ -332,7 +346,21 @@ private: void SetOffscreenRenderTarget (nux::IntrusiveSP<nux::IOpenGLBaseTexture> texture); void RestoreSystemRenderTarget (); - + + void + DrawRoundedRectangle (cairo_t* cr, + double aspect, + double x, + double y, + double cornerRadius, + double width, + double height); + + nux::BaseTexture* + cairoToTexture2D (const char label, + int width, + int height); + std::list<char *> StringToUriList (char * input); nux::HLayout* m_Layout; @@ -412,6 +440,8 @@ private: nux::BaseTexture* _arrow_empty_ltr; nux::BaseTexture* _arrow_empty_rtl; + nux::BaseTexture* _superkey_labels[MAX_SUPERKEY_LABELS]; + nux::IntrusiveSP<nux::IOpenGLBaseTexture> _offscreen_drag_texture; nux::IntrusiveSP<nux::IOpenGLBaseTexture> _offscreen_progress_texture; diff --git a/src/LauncherController.cpp b/src/LauncherController.cpp index 670083697..d9542e679 100644 --- a/src/LauncherController.cpp +++ b/src/LauncherController.cpp @@ -95,11 +95,26 @@ LauncherController::SortAndSave () std::list<BamfLauncherIcon *> launchers; std::list<BamfLauncherIcon *>::iterator it; std::list<const char*> desktop_paths; - + gint shortcut = 1; + gchar *buff; + launchers = _model->GetSublist<BamfLauncherIcon> (); for (it = launchers.begin (); it != launchers.end (); it++) { BamfLauncherIcon *icon = *it; + + if (shortcut != 0 && (*it)->GetQuirk (LauncherIcon::QUIRK_VISIBLE)) + { + buff = NULL; + if (shortcut == 10) + shortcut = 0; + buff = g_strdup_printf ("%d", shortcut); + (*it)->SetShortcut (buff[0]); + g_free (buff); + if (shortcut != 0) + shortcut++; + } + if (!icon->IsSticky ()) continue; @@ -188,6 +203,7 @@ LauncherController::InsertExpoAction () _expoIcon->SetQuirk (LauncherIcon::QUIRK_VISIBLE, true); _expoIcon->SetQuirk (LauncherIcon::QUIRK_RUNNING, false); _expoIcon->SetIconType (LauncherIcon::TYPE_EXPO); + _expoIcon->SetShortcut('w'); _expoIcon->MouseClick.connect (sigc::mem_fun (this, &LauncherController::OnExpoClicked)); diff --git a/src/LauncherIcon.cpp b/src/LauncherIcon.cpp index c5e11651a..81ef01dd2 100644 --- a/src/LauncherIcon.cpp +++ b/src/LauncherIcon.cpp @@ -70,8 +70,10 @@ LauncherIcon::LauncherIcon(Launcher* launcher) _tooltip = new nux::Tooltip (); _icon_type = TYPE_NONE; _sort_priority = 0; + _shortcut = 0; _emblem = 0; + _superkey_label = 0; _quicklist = new QuicklistView (); _quicklist_is_initialized = false; @@ -105,6 +107,9 @@ LauncherIcon::~LauncherIcon() if (_center_stabilize_handle) g_source_remove (_center_stabilize_handle); _center_stabilize_handle = 0; + + if (_superkey_label) + _superkey_label->UnReference (); } bool @@ -224,16 +229,27 @@ nux::BaseTexture * LauncherIcon::TextureFromGtkTheme (const char *icon_name, int GtkIconInfo *info; nux::BaseTexture *result; GError *error = NULL; - - theme = gtk_icon_theme_get_default (); - + GIcon *icon; + if (!icon_name) icon_name = g_strdup (DEFAULT_ICON); - info = gtk_icon_theme_lookup_icon (theme, - icon_name, - size, - (GtkIconLookupFlags) 0); + theme = gtk_icon_theme_get_default (); + icon = g_icon_new_for_string (icon_name, NULL); + + if (G_IS_ICON (icon)) + { + info = gtk_icon_theme_lookup_by_gicon (theme, icon, size, (GtkIconLookupFlags)0); + g_object_unref (icon); + } + else + { + info = gtk_icon_theme_lookup_icon (theme, + icon_name, + size, + (GtkIconLookupFlags) 0); + } + if (!info) { info = gtk_icon_theme_lookup_icon (theme, @@ -244,13 +260,16 @@ nux::BaseTexture * LauncherIcon::TextureFromGtkTheme (const char *icon_name, int if (gtk_icon_info_get_filename (info) == NULL) { + gtk_icon_info_free (info); + info = gtk_icon_theme_lookup_icon (theme, DEFAULT_ICON, size, (GtkIconLookupFlags) 0); } - + pbuf = gtk_icon_info_load_icon (info, &error); + gtk_icon_info_free (info); if (GDK_IS_PIXBUF (pbuf)) { @@ -319,6 +338,21 @@ nux::NString LauncherIcon::GetTooltipText() } void +LauncherIcon::SetShortcut (guint64 shortcut) +{ + // only relocate a digit with a digit (don't overwrite other shortcuts) + if ((!_shortcut || (g_ascii_isdigit ((gchar)_shortcut))) + || !(g_ascii_isdigit ((gchar) shortcut))) + _shortcut = shortcut; +} + +guint64 +LauncherIcon::GetShortcut () +{ + return _shortcut; +} + +void LauncherIcon::RecvMouseEnter () { if (QuicklistManager::Default ()->Current ()) @@ -343,7 +377,7 @@ void LauncherIcon::RecvMouseLeave () _tooltip->ShowWindow (false); } -void LauncherIcon::OpenQuicklist () +void LauncherIcon::OpenQuicklist (bool default_to_first_item) { _tooltip->ShowWindow (false); _quicklist->RemoveAllMenuItem (); @@ -381,7 +415,10 @@ void LauncherIcon::OpenQuicklist () _quicklist->AddMenuItem (item); } } - + + if (default_to_first_item) + _quicklist->DefaultToFirstItem (); + int tip_x = _launcher->GetBaseWidth () + 1; //icon_x + icon_w; int tip_y = _center.y + _launcher->GetParent ()->GetGeometry ().y; QuicklistManager::Default ()->ShowQuicklist (_quicklist, tip_x, tip_y); @@ -669,6 +706,24 @@ LauncherIcon::SetEmblem (nux::BaseTexture *emblem) needs_redraw.emit (this); } +void +LauncherIcon::SetSuperkeyLabel (nux::BaseTexture* label) +{ + if (_superkey_label == label) + return; + + if (_superkey_label) + _superkey_label->UnReference (); + + _superkey_label = label; +} + +nux::BaseTexture* +LauncherIcon::GetSuperkeyLabel () +{ + return _superkey_label; +} + void LauncherIcon::SetEmblemIconName (const char *name) { @@ -759,6 +814,7 @@ LauncherIcon::SetEmblemText (const char *text) emblem = nux::GetThreadGLDeviceFactory()->CreateSystemCapableTexture (); emblem->Update (bitmap); + delete bitmap; SetEmblem (emblem); diff --git a/src/LauncherIcon.h b/src/LauncherIcon.h index 752070b4c..524f9cf17 100644 --- a/src/LauncherIcon.h +++ b/src/LauncherIcon.h @@ -84,13 +84,16 @@ public: nux::NString GetTooltipText (); + void SetShortcut (guint64 shortcut); + guint64 GetShortcut (); + void RecvMouseEnter (); void RecvMouseLeave (); void RecvMouseDown (int button); void RecvMouseUp (int button); void HideTooltip (); - void OpenQuicklist (); + void OpenQuicklist (bool default_to_first_item = false); void SetCenter (nux::Point3 center); nux::Point3 GetCenter (); @@ -173,6 +176,8 @@ protected: void SetSortPriority (int priority); void SetEmblem (nux::BaseTexture *emblem); + void SetSuperkeyLabel (nux::BaseTexture* label); + nux::BaseTexture* GetSuperkeyLabel (); virtual std::list<DbusmenuMenuitem *> GetMenus (); virtual nux::BaseTexture * GetTextureForSize (int size) = 0; @@ -247,12 +252,15 @@ private: bool _quicklist_is_initialized; bool _has_visible_window; + gint64 _shortcut; + nux::Point3 _center; nux::Point3 _last_stable; nux::Point3 _saved_center; IconType _icon_type; nux::BaseTexture* _emblem; + nux::BaseTexture* _superkey_label; bool _quirks[QUIRK_LAST]; struct timespec _quirk_times[QUIRK_LAST]; diff --git a/src/LauncherModel.cpp b/src/LauncherModel.cpp index c55d102a2..632050854 100644 --- a/src/LauncherModel.cpp +++ b/src/LauncherModel.cpp @@ -276,6 +276,22 @@ LauncherModel::end () return _inner.end (); } +LauncherModel::iterator +LauncherModel::at (int index) +{ + LauncherModel::iterator it; + int i; + + // start currently selected icon + for (it = _inner.begin (), i = 0; it != _inner.end (); it++, i++) + { + if (i == index) + return it; + } + + return (LauncherModel::iterator)NULL; +} + LauncherModel::reverse_iterator LauncherModel::rbegin () { diff --git a/src/LauncherModel.h b/src/LauncherModel.h index 6e1f7e6aa..7e04fdc03 100644 --- a/src/LauncherModel.h +++ b/src/LauncherModel.h @@ -50,6 +50,7 @@ public: iterator begin (); iterator end (); + iterator at (int index); reverse_iterator rbegin (); reverse_iterator rend (); diff --git a/src/PanelHomeButton.cpp b/src/PanelHomeButton.cpp index 17ecb0236..38c39f11b 100644 --- a/src/PanelHomeButton.cpp +++ b/src/PanelHomeButton.cpp @@ -132,7 +132,7 @@ PanelHomeButton::RecvMouseClick (int x, if (nux::GetEventButton (button_flags) == 1) { UBusServer *ubus = ubus_server_get_default (); - ubus_server_send_message (ubus, UBUS_HOME_BUTTON_ACTIVATED, NULL); + ubus_server_send_message (ubus, UBUS_DASH_EXTERNAL_ACTIVATION, NULL); } } diff --git a/src/PanelIndicatorObjectEntryView.cpp b/src/PanelIndicatorObjectEntryView.cpp index fe97fc9a9..c45919227 100644 --- a/src/PanelIndicatorObjectEntryView.cpp +++ b/src/PanelIndicatorObjectEntryView.cpp @@ -212,7 +212,7 @@ PanelIndicatorObjectEntryView::Refresh () if (_proxy->GetPixbuf () && _proxy->icon_visible) { - gdk_cairo_set_source_pixbuf (cr, pixbuf, x, (height - gdk_pixbuf_get_height (pixbuf))/2); + gdk_cairo_set_source_pixbuf (cr, pixbuf, x, (int)((height - gdk_pixbuf_get_height (pixbuf))/2)); cairo_paint_with_alpha (cr, _proxy->icon_sensitive ? 1.0 : 0.5); x += icon_width + SPACING; @@ -230,7 +230,7 @@ PanelIndicatorObjectEntryView::Refresh () textshadowcol.GetGreen (), textshadowcol.GetBlue (), 1.0f - textshadowcol.GetRed ()); - cairo_move_to (cr, x, ((height - text_height)/2)-1); + cairo_move_to (cr, x, (int)(((height - text_height)/2)+1)); pango_cairo_show_layout (cr, layout); cairo_stroke (cr); @@ -240,7 +240,7 @@ PanelIndicatorObjectEntryView::Refresh () textcol.GetGreen (), textcol.GetBlue (), _proxy->label_sensitive ? 1.0f : 0.0f); - cairo_move_to (cr, x, (height - text_height)/2); + cairo_move_to (cr, x, (int)((height - text_height)/2)); pango_cairo_show_layout (cr, layout); cairo_stroke (cr); } @@ -295,7 +295,7 @@ draw_menu_bg (cairo_t *cr, int width, int height) PanelStyle *style = PanelStyle::GetDefault (); nux::Color bgtop = style->GetBackgroundTop (); nux::Color bgbot = style->GetBackgroundBottom (); - nux::Color line = style->GetTextShadow (); + nux::Color line = style->GetLineColor (); cairo_set_operator (cr, CAIRO_OPERATOR_OVER); diff --git a/src/PanelIndicatorObjectView.cpp b/src/PanelIndicatorObjectView.cpp index f4a1ef474..619f2a283 100644 --- a/src/PanelIndicatorObjectView.cpp +++ b/src/PanelIndicatorObjectView.cpp @@ -98,8 +98,8 @@ PanelIndicatorObjectView::OnEntryAdded (IndicatorObjectEntryProxy *proxy) AddChild (view); - this->ComputeChildLayout (); - NeedRedraw (); + QueueRelayout(); + QueueDraw (); } void @@ -126,8 +126,8 @@ PanelIndicatorObjectView::OnEntryRemoved(IndicatorObjectEntryProxy *proxy) } } - this->ComputeChildLayout (); - NeedRedraw (); + QueueRelayout (); + QueueDraw (); } const gchar * diff --git a/src/PanelMenuView.cpp b/src/PanelMenuView.cpp index cce86510b..5b3064eb7 100644 --- a/src/PanelMenuView.cpp +++ b/src/PanelMenuView.cpp @@ -25,6 +25,7 @@ #include <Nux/TextureArea.h> #include "NuxGraphics/GLThread.h" +#include "NuxGraphics/XInputWindow.h" #include "Nux/BaseWindow.h" #include "Nux/WindowCompositor.h" @@ -347,17 +348,18 @@ PanelMenuView::GetActiveViewName () gchar *label = NULL; BamfWindow *window; - // There's probably a better way to do this, but we really only want to ignore our own windows - // as there could be cases where windows like ours have menus and we don't want them to fall - // into this statement. Still, will investigate better ways to do this. + _is_own_window = false; + window = bamf_matcher_get_active_window (_matcher); - if (BAMF_IS_WINDOW (window) - && g_str_has_prefix (bamf_view_get_name (BAMF_VIEW (window)), "nux input")) + if (BAMF_IS_WINDOW (window)) { - _is_own_window = true; + std::list<Window> our_xids = nux::XInputWindow::NativeHandleList (); + std::list<Window>::iterator it; + + it = std::find (our_xids.begin (), our_xids.end (), bamf_window_get_xid (BAMF_WINDOW (window))); + if (it != our_xids.end ()) + _is_own_window = true; } - else - _is_own_window = false; if (_is_maximized) { @@ -553,7 +555,7 @@ PanelMenuView::Refresh () void PanelMenuView::OnEntryRefreshed (PanelIndicatorObjectEntryView *view) { - ComputeChildLayout (); + QueueRelayout (); } void @@ -587,8 +589,8 @@ PanelMenuView::OnEntryAdded (IndicatorObjectEntryProxy *proxy) AddChild (view); - this->ComputeChildLayout (); - NeedRedraw (); + QueueRelayout (); + QueueDraw (); } void @@ -615,8 +617,8 @@ PanelMenuView::OnEntryRemoved(IndicatorObjectEntryProxy *proxy) } } - this->ComputeChildLayout (); - NeedRedraw (); + QueueRelayout (); + QueueDraw (); } void diff --git a/src/PanelStyle.cpp b/src/PanelStyle.cpp index 13230f4ba..67232cd60 100644 --- a/src/PanelStyle.cpp +++ b/src/PanelStyle.cpp @@ -81,11 +81,16 @@ PanelStyle::Refresh () _text.SetBlue ((float) style->text[0].blue / (float) 0xffff); _text.SetAlpha (1.0f); - _text_shadow.SetRed ((float) style->dark[0].red / (float) 0xffff); - _text_shadow.SetGreen ((float) style->dark[0].green / (float) 0xffff); - _text_shadow.SetBlue ((float) style->dark[0].blue / (float) 0xffff); + _text_shadow.SetRed ((float) style->text[3].red / (float) 0xffff); + _text_shadow.SetGreen ((float) style->text[3].green / (float) 0xffff); + _text_shadow.SetBlue ((float) style->text[3].blue / (float) 0xffff); _text_shadow.SetAlpha (1.0f); + _line.SetRed ((float) style->dark[0].red / (float) 0xffff); + _line.SetGreen ((float) style->dark[0].green / (float) 0xffff); + _line.SetBlue ((float) style->dark[0].blue / (float) 0xffff); + _line.SetAlpha (1.0f); + _bg_top.SetRed ((float) style->bg[1].red / (float) 0xffff); _bg_top.SetGreen ((float) style->bg[1].green / (float) 0xffff); _bg_top.SetBlue ((float) style->bg[1].blue / (float) 0xffff); @@ -123,6 +128,12 @@ PanelStyle::GetTextShadow () return _text_shadow; } +nux::Color& +PanelStyle::GetLineColor () +{ + return _line; +} + void PanelStyle::OnStyleChanged (GObject* gobject, GParamSpec* pspec, diff --git a/src/PanelStyle.h b/src/PanelStyle.h index c721faa88..b029720ae 100644 --- a/src/PanelStyle.h +++ b/src/PanelStyle.h @@ -52,6 +52,7 @@ class PanelStyle : public nux::Object nux::Color& GetBackgroundTop (); nux::Color& GetBackgroundBottom (); nux::Color& GetTextShadow (); + nux::Color& GetLineColor (); GdkPixbuf * GetBackground (int width, int height); @@ -74,6 +75,7 @@ class PanelStyle : public nux::Object nux::Color _bg_top; nux::Color _bg_bottom; nux::Color _text_shadow; + nux::Color _line; }; #endif // PANEL_STYLE_H diff --git a/src/PanelTray.cpp b/src/PanelTray.cpp index 8f2737b3b..0693cc42a 100644 --- a/src/PanelTray.cpp +++ b/src/PanelTray.cpp @@ -89,8 +89,7 @@ void PanelTray::Sync () { SetMinMaxSize ((_n_children * 24) + (PADDING * 2), 24); - ComputeChildLayout (); - + QueueRelayout (); QueueDraw (); } @@ -119,9 +118,9 @@ PanelTray::FilterTrayCallback (NaTray *tray, NaTrayChild *icon, PanelTray *self) accept = false; break; } - else if (g_str_has_prefix (title, name) - || g_str_has_prefix (res_name, name) - || g_str_has_prefix (res_class, name)) + else if ((title && g_str_has_prefix (title, name)) + || (res_name && g_str_has_prefix (res_name, name)) + || ( res_class && g_str_has_prefix (res_class, name))) { accept = true; break; diff --git a/src/PlaceEntry.h b/src/PlaceEntry.h index 01443c89c..41b2743d5 100644 --- a/src/PlaceEntry.h +++ b/src/PlaceEntry.h @@ -50,13 +50,14 @@ public: virtual const gchar * GetName () = 0; virtual const gchar * GetIcon () = 0; virtual const gchar * GetDescription () = 0; - + virtual guint64 GetShortcut () = 0; + // For ordering entries within a place virtual guint32 GetPosition () = 0; // For DND, what can this entry handle virtual const gchar ** GetMimetypes () = 0; - + virtual const std::map<gchar *, gchar *>& GetHints () = 0; // Whether the entry is sensitive to input (clicks/DND) @@ -85,6 +86,8 @@ public: virtual DeeModel * GetResultsModel () = 0; virtual DeeModel * GetGlobalResultsModel () = 0; + virtual DeeModel * GetGlobalGroupsModel () = 0; + // Signals sigc::signal<void, bool> active_changed; diff --git a/src/PlaceEntryHome.cpp b/src/PlaceEntryHome.cpp index bdfa1bd7b..2ff2328ae 100644 --- a/src/PlaceEntryHome.cpp +++ b/src/PlaceEntryHome.cpp @@ -87,7 +87,7 @@ PlaceEntryHome::OnPlaceEntryAdded (PlaceEntry *entry) iter = dee_model_append (_groups_model, "", text, entry->GetIcon ()); _model_to_group[entry->GetGlobalResultsModel ()] = dee_model_get_position (_groups_model, iter); - + _model_to_group_model[entry->GetGlobalResultsModel ()] = entry->GetGlobalGroupsModel (); g_signal_connect (entry->GetGlobalResultsModel (), "row-added", (GCallback)&PlaceEntryHome::OnResultAdded, this); g_signal_connect (entry->GetGlobalResultsModel (), "row-removed", @@ -110,6 +110,10 @@ PlaceEntryHome::RefreshEntry (PlaceEntry *entry) void PlaceEntryHome::OnResultAdded (DeeModel *model, DeeModelIter *iter, PlaceEntryHome *self) { + // FIXME: This is a hack + if (dee_model_get_uint32 (model, iter, RESULT_GROUP_ID) == 5) + return; + dee_model_append (self->_results_model, dee_model_get_string (model, iter, RESULT_URI), dee_model_get_string (model, iter, RESULT_ICON), @@ -126,6 +130,10 @@ PlaceEntryHome::OnResultRemoved (DeeModel *model, DeeModelIter *it, PlaceEntryHo DeeModelIter *iter, *end; const char *uri; + // FIXME: This is a hack + if (dee_model_get_uint32 (model, it, RESULT_GROUP_ID) == 5) + return; + uri = dee_model_get_string (model, it, RESULT_URI); iter = dee_model_get_first_iter (self->_results_model); @@ -152,7 +160,7 @@ PlaceEntryHome::GetId () const gchar * PlaceEntryHome::GetName () { - return _("Global Search"); + return ""; } const gchar * @@ -167,6 +175,12 @@ PlaceEntryHome::GetDescription () return _("Search across all places"); } +guint64 +PlaceEntryHome::GetShortcut () +{ + return 0; +} + guint32 PlaceEntryHome::GetPosition () { diff --git a/src/PlaceEntryHome.h b/src/PlaceEntryHome.h index 033d15023..56dc3d61e 100644 --- a/src/PlaceEntryHome.h +++ b/src/PlaceEntryHome.h @@ -43,6 +43,7 @@ public: const gchar * GetName (); const gchar * GetIcon (); const gchar * GetDescription (); + guint64 GetShortcut (); guint32 GetPosition (); const gchar ** GetMimetypes (); @@ -64,6 +65,7 @@ public: DeeModel * GetResultsModel (); DeeModel * GetGlobalResultsModel () { return NULL; }; + DeeModel * GetGlobalGroupsModel () { return NULL; }; private: void LoadExistingEntries (); @@ -84,6 +86,7 @@ public: std::map<char *, gchar *> _hints; std::map<DeeModel *, int> _model_to_group; + std::map<DeeModel *, DeeModel *> _model_to_group_model; std::vector<PlaceEntry *> _entries; }; diff --git a/src/PlaceEntryRemote.cpp b/src/PlaceEntryRemote.cpp index 87298f9bc..f500659ca 100644 --- a/src/PlaceEntryRemote.cpp +++ b/src/PlaceEntryRemote.cpp @@ -42,6 +42,7 @@ PlaceEntryRemote::PlaceEntryRemote (const gchar *dbus_name) _name (NULL), _icon (NULL), _description (NULL), + _shortcut (10), // impossible shortcut _position (0), _mimetypes (NULL), _sensitive (true), @@ -54,6 +55,7 @@ PlaceEntryRemote::PlaceEntryRemote (const gchar *dbus_name) _groups_model (NULL), _results_model (NULL), _global_results_model (NULL), + _global_groups_model (NULL), _previous_search (NULL), _previous_section (G_MAXUINT32) { @@ -75,6 +77,7 @@ PlaceEntryRemote::~PlaceEntryRemote () g_object_unref (_groups_model); g_object_unref (_results_model); g_object_unref (_global_results_model); + g_object_unref (_global_groups_model); } void @@ -85,6 +88,7 @@ PlaceEntryRemote::InitFromKeyFile (GKeyFile *key_file, gchar *domain; gchar *name; gchar *description; + gchar *shortcut_entry; _dbus_path = g_key_file_get_string (key_file, group, DBUS_PATH, &error); if (_dbus_path == NULL @@ -126,6 +130,16 @@ PlaceEntryRemote::InitFromKeyFile (GKeyFile *key_file, _name = g_strdup (name); _description = g_strdup (description); } + + if (g_key_file_has_key (key_file, group, "Shortcut", NULL)) + { + shortcut_entry = g_key_file_get_string(key_file, group, "Shortcut", NULL); + if (strlen (shortcut_entry) == 1) + _shortcut = shortcut_entry[0]; + else + g_warning ("Place %s has an uncompatible shortcut: %s", name, shortcut_entry); + g_free (shortcut_entry); + } /* Finally the two that should default to true */ if (g_key_file_has_key (key_file, group, "ShowGlobal", NULL)) @@ -169,6 +183,12 @@ PlaceEntryRemote::GetDescription () return _description; } +guint64 +PlaceEntryRemote::GetShortcut () +{ + return _shortcut; +} + guint32 PlaceEntryRemote::GetPosition () { @@ -313,6 +333,12 @@ PlaceEntryRemote::GetGlobalResultsModel () return _global_results_model; } +DeeModel * +PlaceEntryRemote::GetGlobalGroupsModel () +{ + return _global_groups_model; +} + /* Other methods */ bool PlaceEntryRemote::IsValid () @@ -361,7 +387,7 @@ PlaceEntryRemote::Update (const gchar *dbus_path, _state_changed = true; } - if (g_strcmp0 (_icon, icon) != 0) + if (g_strcmp0 ("", icon) != 0 && g_strcmp0 (_icon, icon) != 0) { g_free (_icon); _icon = g_strdup (icon); @@ -431,7 +457,17 @@ PlaceEntryRemote::Update (const gchar *dbus_path, // FIXME: Spec says if global_renderer == "", then ShowInGlobal () == false, but currently // both places return "" - // FIXME: Handle global groups model name + if (!DEE_IS_SHARED_MODEL (_global_groups_model) || + g_strcmp0 (dee_shared_model_get_swarm_name (DEE_SHARED_MODEL (_global_groups_model)), global_groups_model) != 0) + { + if (DEE_IS_SHARED_MODEL (_global_groups_model)) + g_object_unref (_global_groups_model); + + _global_groups_model = dee_shared_model_new (global_groups_model); + dee_model_set_schema (_global_groups_model, "s", "s", "s", NULL); + + _global_renderer_changed = true; + } if (!DEE_IS_SHARED_MODEL (_global_results_model) || g_strcmp0 (dee_shared_model_get_swarm_name (DEE_SHARED_MODEL (_global_results_model)), global_results_model) != 0) diff --git a/src/PlaceEntryRemote.h b/src/PlaceEntryRemote.h index 1039249d7..23868c329 100644 --- a/src/PlaceEntryRemote.h +++ b/src/PlaceEntryRemote.h @@ -45,6 +45,7 @@ public: const gchar * GetName (); const gchar * GetIcon (); const gchar * GetDescription (); + guint64 GetShortcut (); guint32 GetPosition (); const gchar ** GetMimetypes (); @@ -66,6 +67,7 @@ public: DeeModel * GetResultsModel (); DeeModel * GetGlobalResultsModel (); + DeeModel * GetGlobalGroupsModel (); /* Other methods */ bool IsValid (); @@ -101,6 +103,7 @@ private: gchar *_name; gchar *_icon; gchar *_description; + guint64 _shortcut; guint32 _position; gchar **_mimetypes; std::map<gchar *, gchar *> _hints; @@ -117,6 +120,7 @@ private: DeeModel *_results_model; DeeModel *_global_results_model; + DeeModel *_global_groups_model; gchar *_previous_search; guint32 _previous_section; diff --git a/src/PlaceFactoryFile.cpp b/src/PlaceFactoryFile.cpp index bfd25f4c6..a00a11c85 100644 --- a/src/PlaceFactoryFile.cpp +++ b/src/PlaceFactoryFile.cpp @@ -45,13 +45,14 @@ PlaceFactoryFile::PlaceFactoryFile (const char *directory) return; } - g_file_enumerate_children_async (_dir, - G_FILE_ATTRIBUTE_STANDARD_NAME, - G_FILE_QUERY_INFO_NONE, - 0, - NULL, - on_directory_enumeration_ready, - this); + if (!g_getenv ("UNITY_PLACES_DISABLE")) + g_file_enumerate_children_async (_dir, + G_FILE_ATTRIBUTE_STANDARD_NAME, + G_FILE_QUERY_INFO_NONE, + 0, + NULL, + on_directory_enumeration_ready, + this); } PlaceFactoryFile::~PlaceFactoryFile () diff --git a/src/PlaceLauncherIcon.cpp b/src/PlaceLauncherIcon.cpp index f9d798233..c7851a69b 100644 --- a/src/PlaceLauncherIcon.cpp +++ b/src/PlaceLauncherIcon.cpp @@ -35,6 +35,7 @@ PlaceLauncherIcon::PlaceLauncherIcon (Launcher *launcher, PlaceEntry *entry) escape = g_markup_escape_text (entry->GetName (), -1); SetTooltipText (escape); + SetShortcut (entry->GetShortcut()); SetIconName (entry->GetIcon ()); SetQuirk (QUIRK_VISIBLE, true); SetQuirk (QUIRK_RUNNING, true); @@ -70,11 +71,17 @@ PlaceLauncherIcon::OnMouseClick (int button) if (button == 1) { - Activate (0, ""); + ActivateLauncherIcon (); } } void +PlaceLauncherIcon::ActivateLauncherIcon () +{ + ActivatePlace (0, ""); +} + +void PlaceLauncherIcon::UpdatePlaceIcon () { @@ -101,7 +108,7 @@ PlaceLauncherIcon::GetMenus () } void -PlaceLauncherIcon::Activate (guint section_id, const char *search_string) +PlaceLauncherIcon::ActivatePlace (guint section_id, const char *search_string) { ubus_server_send_message (ubus_server_get_default (), UBUS_PLACE_ENTRY_ACTIVATE_REQUEST, @@ -114,7 +121,7 @@ PlaceLauncherIcon::Activate (guint section_id, const char *search_string) void PlaceLauncherIcon::OnOpen (DbusmenuMenuitem *item, int time, PlaceLauncherIcon *self) { - self->Activate (0, ""); + self->ActivateLauncherIcon (); } void diff --git a/src/PlaceLauncherIcon.h b/src/PlaceLauncherIcon.h index 1976e7413..7833b1a6d 100644 --- a/src/PlaceLauncherIcon.h +++ b/src/PlaceLauncherIcon.h @@ -41,7 +41,8 @@ protected: std::list<DbusmenuMenuitem *> GetMenus (); private: - void Activate (guint section_id, const char *search_string); + void ActivateLauncherIcon (); + void ActivatePlace (guint section_id, const char *search_string); void OnActiveChanged (bool is_active); static void OnOpen (DbusmenuMenuitem *item, int time, PlaceLauncherIcon *self); diff --git a/src/PlacesController.cpp b/src/PlacesController.cpp index a4843de9c..a59da7f2f 100644 --- a/src/PlacesController.cpp +++ b/src/PlacesController.cpp @@ -36,7 +36,7 @@ PlacesController::PlacesController () { // register interest with ubus so that we get activation messages UBusServer *ubus = ubus_server_get_default (); - ubus_server_register_interest (ubus, UBUS_HOME_BUTTON_ACTIVATED, + ubus_server_register_interest (ubus, UBUS_DASH_EXTERNAL_ACTIVATION, (UBusCallback)&PlacesController::ExternalActivation, this); ubus_server_register_interest (ubus, UBUS_PLACE_VIEW_CLOSE_REQUEST, @@ -65,6 +65,8 @@ PlacesController::PlacesController () _window->SetLayout (_window_layout); _view->entry_changed.connect (sigc::mem_fun (this, &PlacesController::OnActivePlaceEntryChanged)); + + PlacesSettings::GetDefault ()->changed.connect (sigc::mem_fun (this, &PlacesController::OnSettingsChanged)); } PlacesController::~PlacesController () @@ -78,7 +80,7 @@ void PlacesController::Show () return; _window->ShowWindow (true, false); - _window->EnableInputWindow (true, "places", true); + _window->EnableInputWindow (true, "places", false, true); _window->GrabPointer (); _window->GrabKeyboard (); _window->NeedRedraw (); @@ -100,10 +102,10 @@ void PlacesController::Hide () _window->UnGrabKeyboard (); _window->EnableInputWindow (false); _window->ShowWindow (false, false); - + _visible = false; - _view->SetActiveEntry (NULL, 0, "", false); + _view->SetActiveEntry (NULL, 0, ""); ubus_server_send_message (ubus_server_get_default (), UBUS_PLACE_VIEW_HIDDEN, NULL); } @@ -117,8 +119,35 @@ void PlacesController::ToggleShowHide () void PlacesController::WindowConfigureCallback(int WindowWidth, int WindowHeight, nux::Geometry& geo, void *user_data) { - // FIXME: This will be a ratio - geo = nux::Geometry (66, 24, 938, 500); + PlacesSettings *settings = PlacesSettings::GetDefault (); + GdkScreen *screen; + gint primary_monitor, width=0, height=0; + GdkRectangle rect; + gint tile_width; + + screen = gdk_screen_get_default (); + primary_monitor = gdk_screen_get_primary_monitor (screen); + gdk_screen_get_monitor_geometry (screen, primary_monitor, &rect); + + tile_width = settings->GetDefaultTileWidth (); + + if (settings->GetFormFactor () == PlacesSettings::DESKTOP) + { + gint half = rect.width / 2; + + while ((width + tile_width) <= half) + width += tile_width; + + width = MAX (width, tile_width * 7); + height = ((width/tile_width) - 3) * tile_width; + } + else + { + width = rect.width - 66; + height = rect.height - 24; + } + + geo = nux::Geometry (66, 24, width, height); } void @@ -161,3 +190,8 @@ PlacesController::AddProperties (GVariantBuilder *builder) { } +void +PlacesController::OnSettingsChanged (PlacesSettings *settings) +{ + // We don't need to do anything just yet over here, it's a placeholder for when we do +} diff --git a/src/PlacesController.h b/src/PlacesController.h index 9b550b2d3..03c876734 100644 --- a/src/PlacesController.h +++ b/src/PlacesController.h @@ -26,6 +26,7 @@ #include <NuxGraphics/GraphicsEngine.h> #include "PlaceFactoryFile.h" +#include "PlacesSettings.h" #include "PlacesView.h" #include "Introspectable.h" @@ -52,6 +53,7 @@ protected: void RecvMouseDownOutsideOfView (int x, int y, unsigned long button_flags, unsigned long key_flags); void OnActivePlaceEntryChanged (PlaceEntry *entry); + void OnSettingsChanged (PlacesSettings *settings); private: nux::BaseWindow *_window; diff --git a/src/PlacesGroup.cpp b/src/PlacesGroup.cpp index 7357a06f4..622a1527a 100644 --- a/src/PlacesGroup.cpp +++ b/src/PlacesGroup.cpp @@ -41,7 +41,8 @@ #include <glib/gi18n-lib.h> PlacesGroup::PlacesGroup (NUX_FILE_LINE_DECL) : -View (NUX_FILE_LINE_PARAM) +View (NUX_FILE_LINE_PARAM), +_idle_id (0) { //~ OnMouseDown.connect (sigc::mem_fun (this, &PlacesGroup::RecvMouseDown)); //~ OnMouseUp.connect (sigc::mem_fun (this, &PlacesGroup::RecvMouseUp)); @@ -50,23 +51,22 @@ View (NUX_FILE_LINE_PARAM) //~ OnMouseEnter.connect (sigc::mem_fun (this, &PlacesGroup::RecvMouseEnter)); //~ OnMouseLeave.connect (sigc::mem_fun (this, &PlacesGroup::RecvMouseLeave)); + _icon_texture = new IconTexture ("", 24); + _icon_texture->SetMinimumSize (24, 24); + _label = new nux::StaticCairoText ("", NUX_TRACKER_LOCATION); - _label->SetFont ("Ubuntu normal 11"); _label->SetTextEllipsize (nux::StaticCairoText::NUX_ELLIPSIZE_END); _label->SetTextAlignment (nux::StaticCairoText::NUX_ALIGN_LEFT); - _label->SetMaximumWidth (320); - _label->SetMinimumWidth (1); _title = new nux::StaticCairoText ("", NUX_TRACKER_LOCATION); - _title->SetFont ("Ubuntu normal 11"); _title->SetTextEllipsize (nux::StaticCairoText::NUX_ELLIPSIZE_END); - _title->SetTextAlignment (nux::StaticCairoText::NUX_ALIGN_RIGHT); - _title->SetMaximumWidth (320); - _title->SetMinimumWidth (1); + _title->SetTextAlignment (nux::StaticCairoText::NUX_ALIGN_LEFT); _header_layout = new nux::HLayout ("", NUX_TRACKER_LOCATION); + _header_layout->SetHorizontalInternalMargin (12); - _header_layout->AddView (_title, 0, nux::MINOR_POSITION_TOP, nux::MINOR_SIZE_FULL); + _header_layout->AddView (_icon_texture, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX); + _header_layout->AddView (_title, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX); _header_layout->AddSpace (1, 1); // FIXME: We don't want to show this as it does nothing right now @@ -101,12 +101,15 @@ PlacesGroup::~PlacesGroup () void PlacesGroup::SetTitle (const char *title) { - _title_string = g_strdup (title); + const gchar *temp = "<big>%s</big>"; + + _title_string = g_strdup_printf (temp, title); UpdateTitle (); } void PlacesGroup::SetEmblem (const char *path_to_emblem) { + _icon_texture->SetByIconName (path_to_emblem, 24); } void PlacesGroup::AddLayout (nux::Layout *layout) @@ -176,20 +179,22 @@ PlacesGroup::UpdateLabel () NeedRedraw (); } -void -PlacesGroup::SetVisible (bool visible) +void PlacesGroup::Relayout () { - _is_visible = visible; - ComputeChildLayout (); - NeedRedraw (); + if (_idle_id == 0) + _idle_id = g_idle_add ((GSourceFunc)OnIdleRelayout, this); } -bool -PlacesGroup::IsVisible () +gboolean PlacesGroup::OnIdleRelayout (PlacesGroup *self) { - return _is_visible; -} + self->QueueDraw (); + self->_group_layout->QueueDraw (); + self->GetLayout ()->QueueDraw (); + self->ComputeChildLayout (); + self->_idle_id = 0; + return FALSE; +} long PlacesGroup::ProcessEvent (nux::IEvent &ievent, long TraverseInfo, long ProcessEventInfo) { diff --git a/src/PlacesGroup.h b/src/PlacesGroup.h index a75667eec..2b66d2690 100644 --- a/src/PlacesGroup.h +++ b/src/PlacesGroup.h @@ -36,6 +36,8 @@ #include <sigc++/functors/ptr_fun.h> #include <sigc++/functors/mem_fun.h> +#include "IconTexture.h" + class PlacesGroup : public nux::View { public: @@ -51,9 +53,7 @@ public: void SetRowHeight (unsigned int row_height); void SetItemDetail (unsigned int total_items, unsigned int visible_items); void SetExpanded (bool expanded); - - void SetVisible (bool visible); - bool IsVisible (); + void Relayout (); protected: nux::StaticCairoText *_label; @@ -64,13 +64,16 @@ protected: unsigned int _total_items; unsigned int _visible_items; - bool _is_visible; - nux::Layout *_content; + IconTexture *_icon_texture; nux::VLayout *_group_layout; nux::HLayout *_header_layout; bool _expanded; + + guint32 _idle_id; + + static gboolean OnIdleRelayout (PlacesGroup *self); void UpdateTitle (); void UpdateLabel (); diff --git a/src/PlacesHomeView.cpp b/src/PlacesHomeView.cpp index 80c086dde..3f30b01da 100644 --- a/src/PlacesHomeView.cpp +++ b/src/PlacesHomeView.cpp @@ -31,7 +31,7 @@ #include <glib.h> #include <glib/gi18n-lib.h> - +#include <gio/gdesktopappinfo.h> #include "ubus-server.h" #include "UBusMessages.h" @@ -39,55 +39,39 @@ #include "PlacesSimpleTile.h" -typedef struct -{ - gchar *name; - gchar *icon; - gchar *exec; +#define DESKTOP_DIR "/desktop/gnome/applications" +#define BROWSER_DIR DESKTOP_DIR"/browser" +#define CALENDAR_DIR DESKTOP_DIR"/calendar" +#define MEDIA_DIR DESKTOP_DIR"/media" -} TileInfo; +enum +{ + TYPE_PLACE=0, + TYPE_EXEC +}; -static TileInfo tile_infos[] = { - { - (gchar*)_("Find Media Apps"), - (gchar*)"applications-multimedia", - (gchar*)"xdg-open /usr/share/applications" - }, - { - (gchar*)_("Find Internet Apps"), - (gchar*)"applications-internet", - (gchar*)"xdg-open /usr/share/applications" - }, - { - (gchar*)_("Find More Apps"), - (gchar*)"find", - (gchar*)"xdg-open /usr/share/applications" - }, - { - (gchar*)_("Find Files"), - (gchar*)"folder-saved-search", - (gchar*)"xdg-open ~" - }, - { - (gchar*)_("Browse the Web"), - (gchar*)"firefox", - (gchar*)"firefox" - }, - { - (gchar*)_("View Photos"), - (gchar*)"shotwell", - (gchar*)"shotwell" - }, +class Shortcut : public PlacesSimpleTile +{ +public: + Shortcut (const char *icon, const char *name, int size) + : PlacesSimpleTile (icon, name, size), + _id (0), + _place_id (NULL), + _place_section (0), + _exec (NULL) { - (gchar*)_("Check Email"), - (gchar*)"evolution", - (gchar*)"evolution" - }, + } + + ~Shortcut () { - (gchar*)_("Listen to Music"), - (gchar*)"media-player-banshee", - (gchar*)"banshee" + g_free (_place_id); + g_free (_exec); } + + int _id; + gchar *_place_id; + guint32 _place_section; + char *_exec; }; PlacesHomeView::PlacesHomeView (NUX_FILE_LINE_DECL) @@ -98,20 +82,6 @@ PlacesHomeView::PlacesHomeView (NUX_FILE_LINE_DECL) _layout = new nux::GridHLayout (NUX_TRACKER_LOCATION); SetCompositionLayout (_layout); - for (guint i = 0; i < G_N_ELEMENTS (tile_infos); i++) - { - gchar *markup = g_strdup_printf ("<big><b>%s</b></big>", tile_infos[i].name); - - PlacesSimpleTile *tile = new PlacesSimpleTile (tile_infos[i].icon, - markup, - 96); - _layout->AddView (tile, 1, nux::eLeft, nux::eFull); - - tile->sigClick.connect (sigc::mem_fun (this, &PlacesHomeView::OnTileClicked)); - - g_free (markup); - } - _layout->ForceChildrenSize (true); _layout->SetChildrenSize (186, 186); _layout->EnablePartialVisibility (false); @@ -120,36 +90,227 @@ PlacesHomeView::PlacesHomeView (NUX_FILE_LINE_DECL) _layout->SetHorizontalExternalMargin (48); _layout->SetVerticalInternalMargin (32); _layout->SetHorizontalInternalMargin (32); + + _client = gconf_client_get_default (); + gconf_client_add_dir (_client, + BROWSER_DIR, + GCONF_CLIENT_PRELOAD_NONE, + NULL); + gconf_client_add_dir (_client, + CALENDAR_DIR, + GCONF_CLIENT_PRELOAD_NONE, + NULL); + gconf_client_add_dir (_client, + MEDIA_DIR, + GCONF_CLIENT_PRELOAD_NONE, + NULL); + gconf_client_notify_add(_client, + BROWSER_DIR"/exec", + (GConfClientNotifyFunc)OnKeyChanged, + this, + NULL, NULL); + gconf_client_notify_add(_client, + CALENDAR_DIR"/exec", + (GConfClientNotifyFunc)OnKeyChanged, + this, + NULL, NULL); + gconf_client_notify_add(_client, + MEDIA_DIR"/exec", + (GConfClientNotifyFunc)OnKeyChanged, + this, + NULL, NULL); + + Refresh (); } PlacesHomeView::~PlacesHomeView () { + g_object_unref (_client); delete _bg_layer; } void -PlacesHomeView::OnTileClicked (PlacesTile *_tile) +PlacesHomeView::OnKeyChanged (GConfClient *client, + guint cnxn_id, + GConfEntry *entry, + PlacesHomeView *self) { - PlacesSimpleTile *tile = static_cast<PlacesSimpleTile *> (_tile); + self->Refresh (); +} + +void +PlacesHomeView::Refresh () +{ + Shortcut *shortcut = NULL; + gchar *markup = NULL; + const char *temp = "<big><b>%s</b></big>"; + + _layout->Clear (); + + // Find Media Apps + markup = g_strdup_printf (temp, _("Find Media Apps")); + shortcut = new Shortcut ("applications-multimedia", + markup, + 96); + shortcut->_id = TYPE_PLACE; + shortcut->_place_id = g_strdup ("/com/canonical/unity/applicationsplace/applications"); + shortcut->_place_section = 4; + _layout->AddView (shortcut, 1, nux::eLeft, nux::eFull); + shortcut->sigClick.connect (sigc::mem_fun (this, &PlacesHomeView::OnShortcutClicked)); + g_free (markup); + + // Find Internet Apps + markup = g_strdup_printf (temp, _("Find Internet Apps")); + shortcut = new Shortcut ("applications-internet", + markup, + 96); + shortcut->_id = TYPE_PLACE; + shortcut->_place_id = g_strdup ("/com/canonical/unity/applicationsplace/applications"); + shortcut->_place_section = 3; + _layout->AddView (shortcut, 1, nux::eLeft, nux::eFull); + shortcut->sigClick.connect (sigc::mem_fun (this, &PlacesHomeView::OnShortcutClicked)); + g_free (markup); + + // Find More Apps + markup = g_strdup_printf (temp, _("Find More Apps")); + shortcut = new Shortcut ("find", + markup, + 96); + shortcut->_id = TYPE_PLACE; + shortcut->_place_id = g_strdup ("/com/canonical/unity/applicationsplace/applications"); + shortcut->_place_section = 0; + _layout->AddView (shortcut, 1, nux::eLeft, nux::eFull); + shortcut->sigClick.connect (sigc::mem_fun (this, &PlacesHomeView::OnShortcutClicked)); + g_free (markup); + + // Find Files + markup = g_strdup_printf (temp, _("Find Files")); + shortcut = new Shortcut ("folder-saved-search", + markup, + 96); + shortcut->_id = TYPE_PLACE; + shortcut->_place_id = g_strdup ("/com/canonical/unity/filesplace/files"); + shortcut->_place_section = 0; + _layout->AddView (shortcut, 1, nux::eLeft, nux::eFull); + shortcut->sigClick.connect (sigc::mem_fun (this, &PlacesHomeView::OnShortcutClicked)); + g_free (markup); + + // Browser + markup = gconf_client_get_string (_client, BROWSER_DIR"/exec", NULL); + CreateShortcutFromExec (markup, _("Browse the Web"), "firefox"); + g_free (markup); + + // Photos + // FIXME: Need to figure out the default + CreateShortcutFromExec ("shotwell", _("View Photos"), "shotwell"); + + // Email + markup = gconf_client_get_string (_client, CALENDAR_DIR"/exec", NULL); + CreateShortcutFromExec (markup, _("Check Email"), "evolution"); + g_free (markup); + + // Music + markup = gconf_client_get_string (_client, MEDIA_DIR"/exec", NULL); + CreateShortcutFromExec (markup, _("Listen to Music"), "banshee-1"); + g_free (markup); + + QueueDraw (); + _layout->QueueDraw (); + QueueRelayout (); +} + +void +PlacesHomeView::CreateShortcutFromExec (const char *exec, + const char *name, + const char *icon_hint) +{ + Shortcut *shortcut = NULL; + gchar *id; + gchar *markup; + gchar *icon; + gchar *real_exec; + GDesktopAppInfo *info; + + markup = g_strdup_printf ("<big><b>%s</b></big>", name); + + // We're going to try and create a desktop id from a exec string. Now, this is hairy at the + // best of times but the following is the closest best-guess without having to do D-Bus + // roundtrips to BAMF. + if (exec) + { + char *basename; + + if (exec[0] == '/') + basename = g_path_get_basename (exec); + else + basename = g_strdup (exec); + + id = g_strdup_printf ("%s.desktop", basename); + + g_free (basename); + } + else + { + id = g_strdup_printf ("%s.desktop", icon_hint); + } - for (guint i = 0; i < G_N_ELEMENTS (tile_infos); i++) + info = g_desktop_app_info_new (id); + if (G_IS_DESKTOP_APP_INFO (info)) + { + icon = g_icon_to_string (g_app_info_get_icon (G_APP_INFO (info))); + real_exec = g_strdup (g_app_info_get_executable (G_APP_INFO (info))); + + g_object_unref (info); + } + else { - if (g_strcmp0 (tile->GetIcon (), tile_infos[i].icon) == 0) + icon = g_strdup (icon_hint); + real_exec = g_strdup ("firefox"); + } + + shortcut = new Shortcut (icon, markup, 96); + shortcut->_id = TYPE_EXEC; + shortcut->_exec = real_exec; //shorcut will free + _layout->AddView (shortcut, 1, nux::eLeft, nux::eFull); + shortcut->sigClick.connect (sigc::mem_fun (this, &PlacesHomeView::OnShortcutClicked)); + + g_free (id); + g_free (markup); + g_free (icon); +} + +void +PlacesHomeView::OnShortcutClicked (PlacesTile *tile) +{ + Shortcut *shortcut = static_cast<Shortcut *> (tile); + int id = shortcut->_id; + + if (id == TYPE_PLACE) + { + ubus_server_send_message (ubus_server_get_default (), + UBUS_PLACE_ENTRY_ACTIVATE_REQUEST, + g_variant_new ("(sus)", + shortcut->_place_id, + shortcut->_place_section, + "")); + } + else if (id == TYPE_EXEC) + { + GError *error = NULL; + + if (!g_spawn_command_line_async (shortcut->_exec, &error)) { - GError *error = NULL; - - g_spawn_command_line_async (tile_infos[i].exec, &error); - if (error) - { - g_warning ("Unable to launch tile: %s", error->message); - g_error_free (error); - } + g_warning ("%s: Unable to launch %s: %s", + G_STRFUNC, + shortcut->_exec, + error->message); + g_error_free (error); } + + ubus_server_send_message (ubus_server_get_default (), + UBUS_PLACE_VIEW_CLOSE_REQUEST, + NULL); } - - ubus_server_send_message (ubus_server_get_default (), - UBUS_PLACE_VIEW_CLOSE_REQUEST, - NULL); } const gchar* PlacesHomeView::GetName () @@ -203,20 +364,6 @@ PlacesHomeView::DrawContent (nux::GraphicsEngine &GfxContext, bool force_draw) } void -PlacesHomeView::PreLayoutManagement () -{ - nux::View::PreLayoutManagement (); -} - -long -PlacesHomeView::PostLayoutManagement (long LayoutResult) -{ - // I'm imagining this is a good as time as any to update the background - - return nux::View::PostLayoutManagement (LayoutResult); -} - -void PlacesHomeView::DrawRoundedRectangle (cairo_t* cr, double aspect, double x, diff --git a/src/PlacesHomeView.h b/src/PlacesHomeView.h index 59d3374fd..00f0b5056 100644 --- a/src/PlacesHomeView.h +++ b/src/PlacesHomeView.h @@ -31,6 +31,8 @@ #include "PlacesTile.h" +#include <gconf/gconf-client.h> + class PlacesHomeView : public Introspectable, public nux::View { public: @@ -41,9 +43,7 @@ public: void Draw (nux::GraphicsEngine& GfxContext, bool force_draw); void DrawContent (nux::GraphicsEngine &GfxContext, bool force_draw); - void PreLayoutManagement (); - long PostLayoutManagement (long LayoutResult); - void OnTileClicked (PlacesTile *tile); + void Refresh (); protected: // Introspectable methods @@ -60,12 +60,21 @@ private: double cornerRadius, double width, double height); + void OnShortcutClicked (PlacesTile *_tile); + static void OnKeyChanged (GConfClient *client, + guint cnxn_id, + GConfEntry *entry, + PlacesHomeView *self); + void CreateShortcutFromExec (const char *exec, + const char *name, + const char *icon_hint); private: nux::AbstractPaintLayer *_bg_layer; nux::GridHLayout *_layout; - int _last_width; - int _last_height; + int _last_width; + int _last_height; + GConfClient *_client; }; diff --git a/src/PlacesResultsController.cpp b/src/PlacesResultsController.cpp index ac495c568..40a39e242 100644 --- a/src/PlacesResultsController.cpp +++ b/src/PlacesResultsController.cpp @@ -31,6 +31,7 @@ #include "PlacesGroup.h" #include "PlacesSimpleTile.h" +#include "PlacesSettings.h" PlacesResultsController::PlacesResultsController () { @@ -64,7 +65,7 @@ PlacesResultsController::AddResultToGroup (const char *groupname, void *_id) { PlacesGroup *group = _groups[groupname]; - + if (!group) { group = CreateGroup (groupname); @@ -80,12 +81,10 @@ PlacesResultsController::AddResultToGroup (const char *groupname, if (group->IsVisible () == false) { group->SetVisible (true); - _results_view->ReJiggyGroups (); - - group->QueueDraw (); - group->ComputeChildLayout (); - group->GetLayout ()->QueueDraw (); + group->Relayout (); } + + tile->QueueDraw (); } void @@ -104,13 +103,10 @@ PlacesResultsController::RemoveResultFromGroup (const char *groupname, if (group->GetLayout ()->GetChildren ().empty ()) { group->SetVisible (false); - _results_view->ReJiggyGroups (); } else { - group->QueueDraw (); - group->GetLayout ()->QueueDraw (); - group->ComputeChildLayout (); + group->Relayout (); } } else @@ -142,10 +138,13 @@ PlacesResultsController::Clear () for (it = _groups.begin (); it != _groups.end (); ++it) { - PlacesGroup *group = static_cast <PlacesGroup *> (it->second); - - _results_view->RemoveGroup (group); - group->UnReference (); + PlacesGroup *group = dynamic_cast <PlacesGroup *> (it->second); + + if (group) + { + _results_view->RemoveGroup (group); + group->UnReference (); + } } _groups.erase (_groups.begin (), _groups.end ()); @@ -154,18 +153,21 @@ PlacesResultsController::Clear () } PlacesGroup * -PlacesResultsController::CreateGroup (const char *groupname) +PlacesResultsController::CreateGroup (const char *groupname, const char *icon) { + PlacesSettings *settings = PlacesSettings::GetDefault (); + PlacesGroup *newgroup = new PlacesGroup (NUX_TRACKER_LOCATION); newgroup->SinkReference (); newgroup->SetTitle (groupname); + newgroup->SetEmblem (icon); newgroup->SetRowHeight (92); newgroup->SetItemDetail (1, 100); newgroup->SetExpanded (true); nux::GridHLayout *layout = new nux::GridHLayout (NUX_TRACKER_LOCATION); layout->ForceChildrenSize (true); - layout->SetChildrenSize (140, 100); + layout->SetChildrenSize (settings->GetDefaultTileWidth (), 100); layout->EnablePartialVisibility (false); layout->SetVerticalExternalMargin (4); @@ -179,7 +181,6 @@ PlacesResultsController::CreateGroup (const char *groupname) _groups[groupname] = newgroup; _results_view->AddGroup (newgroup); - _results_view->ReJiggyGroups (); return newgroup; } diff --git a/src/PlacesResultsController.h b/src/PlacesResultsController.h index e702b5ef9..5ff9a692b 100644 --- a/src/PlacesResultsController.h +++ b/src/PlacesResultsController.h @@ -46,7 +46,8 @@ public: void RemoveResultFromGroup (const char *groupname, void *_id); void Clear (); - PlacesGroup *CreateGroup (const char *groupname); + PlacesGroup *CreateGroup (const char *groupname, + const char *icon=""); protected: const gchar* GetName (); void AddProperties (GVariantBuilder *builder); diff --git a/src/PlacesResultsView.cpp b/src/PlacesResultsView.cpp index d01c8509b..b2a51a116 100644 --- a/src/PlacesResultsView.cpp +++ b/src/PlacesResultsView.cpp @@ -34,6 +34,8 @@ PlacesResultsView::PlacesResultsView (NUX_FILE_LINE_DECL) _layout = new nux::VLayout ("", NUX_TRACKER_LOCATION); _layout->SetContentDistribution(nux::MAJOR_POSITION_TOP); + _layout->SetHorizontalExternalMargin (14); + _layout->SetVerticalInternalMargin (14); setBorder (12); EnableVerticalScrollBar (true); @@ -47,24 +49,6 @@ PlacesResultsView::~PlacesResultsView () } void -PlacesResultsView::ReJiggyGroups () -{ - _layout->Clear (); - std::list<PlacesGroup *>::iterator it; - - for (it = _groups.begin(); it != _groups.end(); it++) - { - if ((*it)->IsVisible ()) - { - _layout->AddView ((*it), 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); - _layout->QueueDraw (); - (*it)->QueueDraw (); - QueueDraw (); - } - } -} - -void PlacesResultsView::Draw (nux::GraphicsEngine &GfxContext, bool force_draw) { } diff --git a/src/PlacesResultsView.h b/src/PlacesResultsView.h index 57ee25a46..d8bf8eb06 100644 --- a/src/PlacesResultsView.h +++ b/src/PlacesResultsView.h @@ -49,9 +49,6 @@ public: void AddGroup (PlacesGroup *group); void RemoveGroup (PlacesGroup *group); - /* I am going to remove this API, its just temporary till nux is fixed */ - void ReJiggyGroups (); - protected: virtual void ScrollLeft (float stepx, int mousedx); virtual void ScrollRight (float stepx, int mousedx); diff --git a/src/PlacesSearchBar.cpp b/src/PlacesSearchBar.cpp index d1abbe39f..f683c0aad 100644 --- a/src/PlacesSearchBar.cpp +++ b/src/PlacesSearchBar.cpp @@ -48,16 +48,35 @@ PlacesSearchBar::PlacesSearchBar (NUX_FILE_LINE_DECL) _bg_layer = new nux::ColorLayer (nux::Color (0xff595853), true); _layout = new nux::HLayout (NUX_TRACKER_LOCATION); + _layout->SetHorizontalInternalMargin (12); + + _search_icon = new IconTexture ("find", 32); + _layout->AddView (_search_icon, 0); + + _layered_layout = new nux::LayeredLayout (); + + _hint = new nux::StaticCairoText (" "); + _hint->SetTextColor (nux::Color (1.0f, 1.0f, 1.0f, 0.5f)); + _layered_layout->AddLayer (_hint); _pango_entry = new nux::TextEntry ("", NUX_TRACKER_LOCATION); _pango_entry->sigTextChanged.connect (sigc::mem_fun (this, &PlacesSearchBar::OnSearchChanged)); + _pango_entry->SetMinimumHeight (30); + _layered_layout->AddLayer (_pango_entry); + _layered_layout->SetPaintAll (true); + _layered_layout->SetActiveLayerN (1); - _layout->AddView (_pango_entry, 1, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); - _layout->SetVerticalExternalMargin (14); + _layout->AddView (_layered_layout, 1, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); + + _layout->SetVerticalExternalMargin (18); _layout->SetHorizontalExternalMargin (18); SetCompositionLayout (_layout); + + g_signal_connect (gtk_settings_get_default (), "notify::gtk-font-name", + G_CALLBACK (OnFontChanged), this); + OnFontChanged (NULL, NULL, this); } PlacesSearchBar::~PlacesSearchBar () @@ -124,19 +143,10 @@ PlacesSearchBar::DrawContent (nux::GraphicsEngine &GfxContext, bool force_draw) } void -PlacesSearchBar::PreLayoutManagement () -{ - nux::View::PreLayoutManagement (); -} - -long -PlacesSearchBar::PostLayoutManagement (long LayoutResult) -{ - return nux::View::PostLayoutManagement (LayoutResult); -} - -void -PlacesSearchBar::SetActiveEntry (PlaceEntry *entry, guint section_id, const char *search_string) +PlacesSearchBar::SetActiveEntry (PlaceEntry *entry, + guint section_id, + const char *search_string, + bool ignore_search) { std::map<gchar *, gchar *> hints; @@ -145,15 +155,25 @@ PlacesSearchBar::SetActiveEntry (PlaceEntry *entry, guint section_id, const char if (_entry) { // i18n: This is for a dynamic place name i.e. "Search Files & Folders" - const gchar *search_template = _("Search %s"); + const gchar *search_template = _("<span font_size='x-small' font_style='italic'>Search %s</span>"); gchar *res; + gchar *tmp; + + tmp = g_markup_escape_text (entry->GetName (), -1); + res = g_strdup_printf (search_template, tmp); + + _hint->SetText (res); - res = g_strdup_printf (search_template, _entry->GetName ()); + if (!ignore_search) + { + _entry->SetActiveSection (section_id); + _entry->SetSearch (search_string ? search_string : "", hints); + } - _entry->SetActiveSection (section_id); - _entry->SetSearch (search_string ? search_string : "", hints); _pango_entry->SetText (search_string ? search_string : ""); + g_free (res); + g_free (tmp); } else { @@ -164,6 +184,8 @@ PlacesSearchBar::SetActiveEntry (PlaceEntry *entry, guint section_id, const char void PlacesSearchBar::OnSearchChanged (nux::TextEntry *text_entry) { + bool is_empty; + if (_live_search_timeout) g_source_remove (_live_search_timeout); @@ -172,6 +194,14 @@ PlacesSearchBar::OnSearchChanged (nux::TextEntry *text_entry) this); search_changed.emit (_pango_entry->GetText ().c_str ()); + + + is_empty = g_strcmp0 (_pango_entry->GetText ().c_str (), "") == 0; + _hint->SetVisible (is_empty); + + _hint->QueueDraw (); + _pango_entry->QueueDraw (); + QueueDraw (); } bool @@ -194,6 +224,36 @@ PlacesSearchBar::EmitLiveSearch () _live_search_timeout = 0; } +void +PlacesSearchBar::OnFontChanged (GObject *object, GParamSpec *pspec, PlacesSearchBar *self) +{ +#define HOW_LARGE 10 + GtkSettings *settings; + gchar *font_name = NULL; + PangoFontDescription *desc; + gint size; + gchar *font_desc; + + settings = gtk_settings_get_default (); + g_object_get (settings, "gtk-font-name", &font_name, NULL); + + desc = pango_font_description_from_string (font_name); + self->_pango_entry->SetFontFamily (pango_font_description_get_family (desc)); + + size = pango_font_description_get_size (desc); + size /= pango_font_description_get_size_is_absolute (desc) ? 1 : PANGO_SCALE; + self->_pango_entry->SetFontSize ( size + HOW_LARGE); + + self->_pango_entry->SetFontOptions (gdk_screen_get_font_options (gdk_screen_get_default ())); + + font_desc = g_strdup_printf ("%s %d", pango_font_description_get_family (desc), size + HOW_LARGE); + self->_hint->SetFont (font_desc); + + pango_font_description_free (desc); + g_free (font_name); + g_free (font_desc); +} + static void draw_rounded_rect (cairo_t* cr, double aspect, @@ -248,12 +308,13 @@ draw_rounded_rect (cairo_t* cr, radius, 180.0f * G_PI / 180.0f, 270.0f * G_PI / 180.0f); + cairo_close_path (cr); } void PlacesSearchBar::UpdateBackground () { -#define PADDING 8 +#define PADDING 14 #define RADIUS 6 int x, y, width, height; nux::Geometry geo = GetGeometry (); @@ -273,17 +334,27 @@ PlacesSearchBar::UpdateBackground () cairo_translate (cr, 0.5, 0.5); cairo_set_line_width (cr, 1.0); - cairo_set_source_rgba (cr, 0.0f, 0.0f, 0.0f, 1.0f); - draw_rounded_rect (cr, 1.0f, x, y, RADIUS, width, height); - cairo_close_path (cr); - + cairo_set_source_rgba (cr, 0.0f, 0.0f, 0.0f, 0.8f); cairo_fill_preserve (cr); cairo_set_source_rgba (cr, 1.0f, 1.0f, 1.0f, 0.8f); cairo_stroke (cr); + //FIXME: This is until we get proper glow + draw_rounded_rect (cr, 1.0f, x-1, y-1, RADIUS, width+2, height+2); + cairo_set_source_rgba (cr, 1.0f, 1.0f, 1.0f, 0.4f); + cairo_stroke (cr); + + draw_rounded_rect (cr, 1.0f, x-2, y-2, RADIUS, width+4, height+4); + cairo_set_source_rgba (cr, 1.0f, 1.0f, 1.0f, 0.2f); + cairo_stroke (cr); + + draw_rounded_rect (cr, 1.0f, x-3, y-3, RADIUS, width+6, height+6); + cairo_set_source_rgba (cr, 1.0f, 1.0f, 1.0f, 0.1f); + cairo_stroke (cr); + cairo_destroy (cr); nux::NBitmapData* bitmap = cairo_graphics.GetBitmap(); @@ -299,14 +370,14 @@ PlacesSearchBar::UpdateBackground () delete _bg_layer; nux::ROPConfig rop; - rop.Blend = false; // Disable the blending. By default rop.Blend is false. + rop.Blend = true; // Disable the blending. By default rop.Blend is false. rop.SrcBlend = GL_ONE; // Set the source blend factor. rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA; // Set the destination blend factor. _bg_layer = new nux::TextureLayer (texture2D->GetDeviceTexture(), texxform, // The Oject that defines the texture wraping and coordinate transformation. nux::Color::White, // The color used to modulate the texture. - false, // Write the alpha value of the texture to the destination buffer. + true, // Write the alpha value of the texture to the destination buffer. rop // Use the given raster operation to set the blending when the layer is being rendered. ); diff --git a/src/PlacesSearchBar.h b/src/PlacesSearchBar.h index 76f01c379..196e4d504 100644 --- a/src/PlacesSearchBar.h +++ b/src/PlacesSearchBar.h @@ -20,8 +20,10 @@ #ifndef PLACES_SEARCH_BAR_H #define PLACES_SEARCH_BAR_H -#include <Nux/View.h> +#include <Nux/LayeredLayout.h> #include <Nux/TextureArea.h> +#include <Nux/View.h> + #include <NuxGraphics/GraphicsEngine.h> #include "Introspectable.h" @@ -31,6 +33,11 @@ #include "PlaceEntry.h" +#include <gtk/gtk.h> + +#include "IconTexture.h" +#include "StaticCairoText.h" + class PlacesSearchBar : public Introspectable, public nux::View { NUX_DECLARE_OBJECT_TYPE (PlacesSearchBar, nux::View); @@ -42,10 +49,10 @@ public: virtual void Draw (nux::GraphicsEngine& GfxContext, bool force_draw); virtual void DrawContent (nux::GraphicsEngine &GfxContext, bool force_draw); - virtual void PreLayoutManagement (); - virtual long PostLayoutManagement (long LayoutResult); - - void SetActiveEntry (PlaceEntry *entry, guint section_id, const char *search_string); + void SetActiveEntry (PlaceEntry *entry, + guint section_id, + const char *search_string, + bool ignore=false); sigc::signal<void, const char *> search_changed; @@ -61,15 +68,19 @@ private: void EmitLiveSearch (); static bool OnLiveSearchTimeout (PlacesSearchBar *self); + static void OnFontChanged (GObject *object, GParamSpec *pspec, PlacesSearchBar *self); private: nux::AbstractPaintLayer *_bg_layer; nux::HLayout *_layout; + nux::LayeredLayout *_layered_layout; + nux::StaticCairoText *_hint; nux::TextEntry *_pango_entry; int _last_width; int _last_height; PlaceEntry *_entry; guint _live_search_timeout; + IconTexture *_search_icon; }; #endif diff --git a/src/PlacesSettings.cpp b/src/PlacesSettings.cpp new file mode 100644 index 000000000..005268eff --- /dev/null +++ b/src/PlacesSettings.cpp @@ -0,0 +1,93 @@ +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- +/* +* Copyright (C) 2010 Canonical Ltd +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 3 as +* published by the Free Software Foundation. +* +* 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/>. +* +* Authored by: Neil Jagdish Patel <neil.patel@canonical.com> +*/ + +#include "gdk/gdk.h" + +#include "PlacesSettings.h" + +static PlacesSettings *_places_settings = NULL; + +PlacesSettings::PlacesSettings () +: _settings (NULL), + _raw_from_factor (0), + _form_factor (DESKTOP) +{ + _settings = g_settings_new ("com.canonical.Unity"); + g_signal_connect (_settings, "changed", + (GCallback)(PlacesSettings::Changed), this); + Refresh (); +} + +PlacesSettings::~PlacesSettings () +{ + g_object_unref (_settings); +} + +void +PlacesSettings::Refresh () +{ + _raw_from_factor = g_settings_get_enum (_settings, "form-factor"); + + if (_raw_from_factor == 0) //Automatic + { + GdkScreen *screen; + gint primary_monitor; + GdkRectangle geo; + + screen = gdk_screen_get_default (); + primary_monitor = gdk_screen_get_primary_monitor (screen); + gdk_screen_get_monitor_geometry (screen, primary_monitor, &geo); + + _form_factor = geo.height > 800 ? DESKTOP : NETBOOK; + } + else + { + _form_factor = (FormFactor)_raw_from_factor; + } + + changed.emit (this); +} + +void +PlacesSettings::Changed (GSettings *settings, char *key, PlacesSettings *self) +{ + self->Refresh (); +} + +PlacesSettings * +PlacesSettings::GetDefault () +{ + if (G_UNLIKELY (!_places_settings)) + _places_settings = new PlacesSettings (); + + return _places_settings; +} + +PlacesSettings::FormFactor +PlacesSettings::GetFormFactor () +{ + return _form_factor; +} + +int +PlacesSettings::GetDefaultTileWidth () +{ + //FIXME: We want to calculate this from DPI + return 140; +} diff --git a/src/PlacesSettings.h b/src/PlacesSettings.h new file mode 100644 index 000000000..991bb4073 --- /dev/null +++ b/src/PlacesSettings.h @@ -0,0 +1,58 @@ +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- +/* +* Copyright (C) 2010 Canonical Ltd +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 3 as +* published by the Free Software Foundation. +* +* 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/>. +* +* Authored by: Neil Jagdish Patel <neil.patel@canonical.com> +*/ + +#ifndef PLACES_SETTINGS_H +#define PLACES_SETTINGS_H + +#include <gio/gio.h> +#include <Nux/Nux.h> + +#include "PlacesSettings.h" + +class PlacesSettings : public nux::Object +{ +public: + typedef enum + { + DESKTOP=1, + NETBOOK + + } FormFactor; + + PlacesSettings (); + ~PlacesSettings (); + + static PlacesSettings * GetDefault (); + + FormFactor GetFormFactor (); + int GetDefaultTileWidth (); + + sigc::signal<void, PlacesSettings *> changed; + +private: + void Refresh (); + static void Changed (GSettings *settings, gchar *key, PlacesSettings *self); + +private: + GSettings *_settings; + int _raw_from_factor; + FormFactor _form_factor; +}; + +#endif // PLACES_SETTINGS_H diff --git a/src/PlacesSimpleTile.cpp b/src/PlacesSimpleTile.cpp index 2a45badd3..876b01e7d 100644 --- a/src/PlacesSimpleTile.cpp +++ b/src/PlacesSimpleTile.cpp @@ -24,6 +24,10 @@ #include "IconTexture.h" +#include "PlacesSettings.h" + +#define ICON_HEIGHT 48 + PlacesSimpleTile::PlacesSimpleTile (const char *icon_name, const char *label, int icon_size) : PlacesTile (NUX_TRACKER_LOCATION), _label (NULL), @@ -36,6 +40,7 @@ PlacesSimpleTile::PlacesSimpleTile (const char *icon_name, const char *label, in _icon = g_strdup (icon_name); _icontex = new IconTexture (_icon, icon_size); + _icontex->SetMinMaxSize (PlacesSettings::GetDefault ()->GetDefaultTileWidth (), icon_size); _icontex->SinkReference (); _cairotext = new nux::StaticCairoText (_label); @@ -50,8 +55,7 @@ PlacesSimpleTile::PlacesSimpleTile (const char *icon_name, const char *label, in _layout->AddLayout (new nux::SpaceLayout (0, 0, 12, 12)); _layout->AddView (_cairotext, 0, nux::eCenter, nux::eFull); - SetMinimumSize (160, 128); - SetMaximumSize (160, 128); + SetMinMaxSize (160, 128); AddChild (_icontex); @@ -73,12 +77,14 @@ nux::Geometry PlacesSimpleTile::GetHighlightGeometry () { nux::Geometry base = GetGeometry (); - nux::Geometry icontex_base = _icontex->GetGeometry (); + int width = 0, height = 0; + + _icontex->GetTextureSize (&width, &height); - _highlight_geometry.x = (base.width - icontex_base.width) / 2; + _highlight_geometry.x = (base.width - width) / 2; _highlight_geometry.y = 12; - _highlight_geometry.width = icontex_base.width; - _highlight_geometry.height = icontex_base.height; + _highlight_geometry.width = width; + _highlight_geometry.height = height; return _highlight_geometry; } diff --git a/src/PlacesTile.cpp b/src/PlacesTile.cpp index aa015df2f..9ee4f3136 100644 --- a/src/PlacesTile.cpp +++ b/src/PlacesTile.cpp @@ -59,7 +59,6 @@ PlacesTile::~PlacesTile () nux::Geometry PlacesTile::GetHighlightGeometry () { - return GetGeometry (); } @@ -258,19 +257,19 @@ long PlacesTile::ProcessEvent (nux::IEvent &ievent, long TraverseInfo, long Proc void PlacesTile::Draw (nux::GraphicsEngine& gfxContext, bool forceDraw) { - UpdateBackground (); - nux::Geometry hl_geo = GetHighlightGeometry (); nux::Geometry base = GetGeometry (); - - nux::Geometry total_highlight_geo = nux::Geometry (base.x + hl_geo.x - 3, base.y + hl_geo.y - 3, - hl_geo.width + 7, hl_geo.height + 7); - gfxContext.PushClippingRectangle (base); nux::GetPainter ().PaintBackground (gfxContext, GetGeometry ()); if (_state == STATE_HOVER) { + UpdateBackground (); + nux::Geometry hl_geo = GetHighlightGeometry (); + + nux::Geometry total_highlight_geo = nux::Geometry (base.x + hl_geo.x - 3, base.y + hl_geo.y - 3, + hl_geo.width + 7, hl_geo.height + 7); + gPainter.PushDrawLayer (gfxContext, total_highlight_geo, _hilight_layer); gPainter.PopBackground (); } @@ -280,11 +279,13 @@ void PlacesTile::Draw (nux::GraphicsEngine& gfxContext, void PlacesTile::DrawContent (nux::GraphicsEngine &GfxContext, bool force_draw) { - UpdateBackground (); GfxContext.PushClippingRectangle (GetGeometry() ); if (_state == STATE_HOVER) + { + UpdateBackground (); nux::GetPainter ().PushLayer (GfxContext, GetGeometry (), _hilight_layer); + } _layout->ProcessDraw (GfxContext, force_draw); diff --git a/src/PlacesView.cpp b/src/PlacesView.cpp index 5ae0fb35f..1d73c30a2 100644 --- a/src/PlacesView.cpp +++ b/src/PlacesView.cpp @@ -105,7 +105,7 @@ PlacesView::ProcessEvent(nux::IEvent &ievent, long TraverseInfo, long ProcessEve SetActiveEntry (NULL, 0, ""); return TraverseInfo; } - + ret = _layout->ProcessEvent (ievent, ret, ProcessEventInfo); return ret; } @@ -125,9 +125,13 @@ void PlacesView::DrawContent (nux::GraphicsEngine &GfxContext, bool force_draw) { GfxContext.PushClippingRectangle (GetGeometry() ); - + GfxContext.GetRenderStates ().SetBlend (true); + GfxContext.GetRenderStates ().SetPremultipliedBlend (nux::SRC_OVER); + if (_layout) _layout->ProcessDraw (GfxContext, force_draw); + + GfxContext.GetRenderStates ().SetBlend (false); GfxContext.PopClippingRectangle (); } @@ -154,16 +158,18 @@ PlacesView::SetActiveEntry (PlaceEntry *entry, guint section_id, const char *sea g_signal_handler_disconnect (_entry->GetResultsModel (), _result_removed_id); _group_added_id = _group_removed_id = _result_added_id = _result_removed_id = 0; + _results_controller->Clear (); } _entry = entry; - + std::map <gchar*, gchar*> hints; DeeModel *groups, *results; DeeModelIter *iter, *last; _entry->SetActive (true); + _search_bar->SetActiveEntry (_entry, section_id, search_string, (_entry == _home_entry)); groups = _entry->GetGroupsModel (); iter = dee_model_get_first_iter (groups); @@ -172,17 +178,24 @@ PlacesView::SetActiveEntry (PlaceEntry *entry, guint section_id, const char *sea { _results_controller->CreateGroup (dee_model_get_string (groups, iter, - PlaceEntry::GROUP_NAME)); + PlaceEntry::GROUP_NAME), + dee_model_get_string (groups, + iter, + PlaceEntry::GROUP_ICON)); + g_debug ("%s", dee_model_get_string (groups, iter, PlaceEntry::GROUP_ICON)); iter = dee_model_next (groups, iter); } - results = _entry->GetResultsModel (); - iter = dee_model_get_first_iter (results); - last = dee_model_get_last_iter (results); - while (iter != last) + if (_entry != _home_entry) { - OnResultAdded (results, iter, this); - iter = dee_model_next (results, iter); + results = _entry->GetResultsModel (); + iter = dee_model_get_first_iter (results); + last = dee_model_get_last_iter (results); + while (iter != last) + { + OnResultAdded (results, iter, this); + iter = dee_model_next (results, iter); + } } _group_added_id = g_signal_connect (_entry->GetGroupsModel (), "row-added", @@ -198,8 +211,6 @@ PlacesView::SetActiveEntry (PlaceEntry *entry, guint section_id, const char *sea _layered_layout->SetActiveLayer (_home_view); else _layered_layout->SetActiveLayer (_results_view); - - _search_bar->SetActiveEntry (_entry, section_id, search_string); } PlaceEntry * @@ -221,7 +232,12 @@ PlacesView::GetResultsController () void PlacesView::OnGroupAdded (DeeModel *model, DeeModelIter *iter, PlacesView *self) { - g_debug ("GroupAdded: %s", dee_model_get_string (model, iter, 1)); + self->_results_controller->CreateGroup (dee_model_get_string (model, + iter, + PlaceEntry::GROUP_NAME), + dee_model_get_string (model, + iter, + PlaceEntry::GROUP_ICON)); } @@ -243,7 +259,8 @@ PlacesView::OnResultAdded (DeeModel *model, DeeModelIter *iter, PlacesView *self PlacesSimpleTile *tile; //FIXME: We can't do anything with these do just ignore - if (g_str_has_prefix (dee_model_get_string (model, iter, PlaceEntry::RESULT_URI), "unity-install")) + if (g_str_has_prefix (dee_model_get_string (model, iter, PlaceEntry::RESULT_URI), + "unity-install")) return; active = self->GetActiveEntry (); @@ -267,21 +284,12 @@ PlacesView::OnResultAdded (DeeModel *model, DeeModelIter *iter, PlacesView *self void PlacesView::OnResultRemoved (DeeModel *model, DeeModelIter *iter, PlacesView *self) { - PlaceEntry *active; - DeeModel *groups; - DeeModelIter *git; - const gchar *group_id; - //FIXME: We can't do anything with these do just ignore - if (g_str_has_prefix (dee_model_get_string (model, iter, PlaceEntry::RESULT_URI), "unity-install")) + if (g_str_has_prefix (dee_model_get_string (model, iter, PlaceEntry::RESULT_URI), + "unity-install")) return; - active = self->GetActiveEntry (); - groups = active->GetGroupsModel (); - git = dee_model_get_iter_at_row (groups, dee_model_get_uint32 (model, - iter, - PlaceEntry::RESULT_GROUP_ID)); - group_id = dee_model_get_string (groups, git, PlaceEntry::GROUP_NAME); - self->GetResultsController ()->RemoveResultFromGroup (group_id, iter); + + self->GetResultsController ()->RemoveResult (iter); } void diff --git a/src/QuicklistMenuItemCheckmark.cpp b/src/QuicklistMenuItemCheckmark.cpp index e98e6379f..d44d0d93b 100644 --- a/src/QuicklistMenuItemCheckmark.cpp +++ b/src/QuicklistMenuItemCheckmark.cpp @@ -245,6 +245,7 @@ QuicklistMenuItemCheckmark::UpdateTexture () _normalTexture[0] = nux::GetThreadGLDeviceFactory()->CreateSystemCapableTexture (); _normalTexture[0]->Update (bitmap); + delete bitmap; // draw normal, checked version cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); @@ -286,6 +287,7 @@ QuicklistMenuItemCheckmark::UpdateTexture () _normalTexture[1] = nux::GetThreadGLDeviceFactory()->CreateSystemCapableTexture (); _normalTexture[1]->Update (bitmap); + delete bitmap; // draw active/prelight, unchecked version cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); @@ -316,6 +318,7 @@ QuicklistMenuItemCheckmark::UpdateTexture () _prelightTexture[0] = nux::GetThreadGLDeviceFactory()->CreateSystemCapableTexture (); _prelightTexture[0]->Update (bitmap); + delete bitmap; // draw active/prelight, checked version cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); @@ -366,6 +369,7 @@ QuicklistMenuItemCheckmark::UpdateTexture () _prelightTexture[1] = nux::GetThreadGLDeviceFactory()->CreateSystemCapableTexture (); _prelightTexture[1]->Update (bitmap); + delete bitmap; // finally clean up delete _cairoGraphics; diff --git a/src/QuicklistMenuItemLabel.cpp b/src/QuicklistMenuItemLabel.cpp index 41d68a2dc..d4c7af524 100644 --- a/src/QuicklistMenuItemLabel.cpp +++ b/src/QuicklistMenuItemLabel.cpp @@ -218,6 +218,7 @@ QuicklistMenuItemLabel::UpdateTexture () _normalTexture[0] = nux::GetThreadGLDeviceFactory()->CreateSystemCapableTexture (); _normalTexture[0]->Update (bitmap); + delete bitmap; // draw active/prelight, unchecked version cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); @@ -248,6 +249,7 @@ QuicklistMenuItemLabel::UpdateTexture () _prelightTexture[0] = nux::GetThreadGLDeviceFactory()->CreateSystemCapableTexture (); _prelightTexture[0]->Update (bitmap); + delete bitmap; // finally clean up delete _cairoGraphics; diff --git a/src/QuicklistMenuItemRadio.cpp b/src/QuicklistMenuItemRadio.cpp index d88094e08..07e33f7c7 100644 --- a/src/QuicklistMenuItemRadio.cpp +++ b/src/QuicklistMenuItemRadio.cpp @@ -247,6 +247,7 @@ QuicklistMenuItemRadio::UpdateTexture () _normalTexture[0] = nux::GetThreadGLDeviceFactory()->CreateSystemCapableTexture (); _normalTexture[0]->Update (bitmap); + delete bitmap; // draw normal, enabled version cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); @@ -275,6 +276,7 @@ QuicklistMenuItemRadio::UpdateTexture () _normalTexture[1] = nux::GetThreadGLDeviceFactory()->CreateSystemCapableTexture (); _normalTexture[1]->Update (bitmap); + delete bitmap; // draw active/prelight, unchecked version cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); @@ -305,6 +307,7 @@ QuicklistMenuItemRadio::UpdateTexture () _prelightTexture[0] = nux::GetThreadGLDeviceFactory()->CreateSystemCapableTexture (); _prelightTexture[0]->Update (bitmap); + delete bitmap; // draw active/prelight, unchecked version cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); @@ -338,6 +341,7 @@ QuicklistMenuItemRadio::UpdateTexture () _prelightTexture[1] = nux::GetThreadGLDeviceFactory()->CreateSystemCapableTexture (); _prelightTexture[1]->Update (bitmap); + delete bitmap; // finally clean up delete _cairoGraphics; diff --git a/src/QuicklistMenuItemSeparator.cpp b/src/QuicklistMenuItemSeparator.cpp index cff1fc5c4..7247db5f5 100644 --- a/src/QuicklistMenuItemSeparator.cpp +++ b/src/QuicklistMenuItemSeparator.cpp @@ -175,6 +175,7 @@ QuicklistMenuItemSeparator::UpdateTexture () _normalTexture[0] = nux::GetThreadGLDeviceFactory()->CreateSystemCapableTexture (); _normalTexture[0]->Update (bitmap); + delete bitmap; delete _cairoGraphics; } diff --git a/src/QuicklistView.cpp b/src/QuicklistView.cpp index 254919cdc..c9913a7b5 100644 --- a/src/QuicklistView.cpp +++ b/src/QuicklistView.cpp @@ -38,6 +38,9 @@ #include "Introspectable.h" +#include "ubus-server.h" +#include "UBusMessages.h" + NUX_IMPLEMENT_OBJECT_TYPE (QuicklistView); QuicklistView::QuicklistView () @@ -91,10 +94,85 @@ QuicklistView::QuicklistView () OnMouseClick.connect (sigc::mem_fun (this, &QuicklistView::RecvMouseClick)); OnMouseMove.connect (sigc::mem_fun (this, &QuicklistView::RecvMouseMove)); OnMouseDrag.connect (sigc::mem_fun (this, &QuicklistView::RecvMouseDrag)); - + OnKeyPressed.connect (sigc::mem_fun (this, &QuicklistView::RecvKeyPressed)); + _mouse_down = false; _enable_quicklist_for_testing = false; _compute_blur_bkg = true; + + _current_item_index = 0; +} + +void +QuicklistView::RecvKeyPressed (unsigned int key_sym, + unsigned long key_code, + unsigned long key_state) +{ + switch (key_sym) + { + // up (highlight previous menu-item) + case NUX_VK_UP: + if (_current_item_index > 0) + { + GetNthItems (_current_item_index)->_prelight = false; + _current_item_index--; + GetNthItems (_current_item_index)->_prelight = true; + QueueDraw (); + } + break; + + // down (highlight next menu-item) + case NUX_VK_DOWN: + if (_current_item_index < GetNumItems () - 1) + { + GetNthItems (_current_item_index)->_prelight = false; + _current_item_index++; + GetNthItems (_current_item_index)->_prelight = true; + QueueDraw (); + } + break; + + // left (close quicklist, go back to laucher key-nav) + case NUX_VK_LEFT: + _current_item_index = 0; + GetNthItems (_current_item_index)->_prelight = true; + Hide (); + // inform Launcher we switch back to Launcher key-nav + ubus_server_send_message (ubus_server_get_default (), + UBUS_QUICKLIST_END_KEY_NAV, + NULL); + break; + + // esc (close quicklist, exit key-nav) + case NUX_VK_ESCAPE: + _current_item_index = 0; + GetNthItems (_current_item_index)->_prelight = true; + Hide (); + // inform UnityScreen we leave key-nav completely + ubus_server_send_message (ubus_server_get_default (), + UBUS_LAUNCHER_END_KEY_NAV, + NULL); + break; + + // <SPACE>, <RETURN> (activate selected menu-item) + case NUX_VK_SPACE: + case NUX_VK_ENTER: + if (_current_item_index >= 0 && _current_item_index < GetNumItems ()) + { + + dbusmenu_menuitem_handle_event (GetNthItems (_current_item_index)->_menuItem, + "clicked", + NULL, + 0); + _current_item_index = 0; + GetNthItems (_current_item_index)->_prelight = true; + Hide (); + } + break; + + default: + break; + } } QuicklistView::~QuicklistView () @@ -185,7 +263,8 @@ void QuicklistView::Show () { // FIXME: ShowWindow shouldn't need to be called first ShowWindow (true); - EnableInputWindow (true, "quicklist", true); + EnableInputWindow (true, "quicklist", true, false); + SetInputFocus (); GrabPointer (); NeedRedraw (); @@ -256,6 +335,8 @@ long QuicklistView::ProcessEvent (nux::IEvent& ievent, long TraverseInfo, long P return nux::eMouseEventSolved; } + ret = OnEvent (ievent, ret, ProcessEventInfo); + return ret; } @@ -785,6 +866,15 @@ std::list<QuicklistMenuItem*> QuicklistView::GetChildren () return l; } +void QuicklistView::DefaultToFirstItem () +{ + if (GetNumItems () >= 1) + { + GetNthItems (0)->_prelight= true; + QueueDraw (); + } +} + static inline void ql_blurinner (guchar* pixel, gint *zR, gint *zG, diff --git a/src/QuicklistView.h b/src/QuicklistView.h index 214fcf51f..562523503 100644 --- a/src/QuicklistView.h +++ b/src/QuicklistView.h @@ -89,7 +89,8 @@ public: QuicklistMenuItem* GetNthItems (int index); QuicklistMenuItemType GetNthType (int index); std::list<QuicklistMenuItem*> GetChildren (); - + void DefaultToFirstItem (); + void TestMenuItems (DbusmenuMenuitem* root); // Introspection @@ -113,6 +114,10 @@ private: void RecvMouseMove (int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags); void RecvMouseDrag (int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags); void RecvMouseDownOutsideOfQuicklist (int x, int y, unsigned long button_flags, unsigned long key_flags); + + void RecvKeyPressed (unsigned int key_sym, + unsigned long key_code, + unsigned long key_state); void PreLayoutManagement (); @@ -175,6 +180,8 @@ private: // Introspection gchar *_name; + // used by keyboard/a11y-navigation + int _current_item_index; }; #endif // QUICKLISTVIEW_H diff --git a/src/SimpleLauncherIcon.cpp b/src/SimpleLauncherIcon.cpp index d771d7fd4..11b0b67ab 100644 --- a/src/SimpleLauncherIcon.cpp +++ b/src/SimpleLauncherIcon.cpp @@ -44,11 +44,6 @@ SimpleLauncherIcon::~SimpleLauncherIcon() } void -SimpleLauncherIcon::Activate () -{ -} - -void SimpleLauncherIcon::OnMouseDown (int button) { } @@ -75,6 +70,12 @@ SimpleLauncherIcon::OnMouseLeave () { } +void +SimpleLauncherIcon::ActivateLauncherIcon () +{ + MouseClick.emit (1); +} + nux::BaseTexture * SimpleLauncherIcon::GetTextureForSize (int size) { diff --git a/src/SimpleLauncherIcon.h b/src/SimpleLauncherIcon.h index 5530640a8..f991aaab9 100644 --- a/src/SimpleLauncherIcon.h +++ b/src/SimpleLauncherIcon.h @@ -35,8 +35,6 @@ public: void SetIconName (const char *name); - virtual void Activate (); - protected: virtual void OnMouseDown (int button); virtual void OnMouseUp (int button); @@ -48,6 +46,7 @@ private: char *m_IconName; nux::BaseTexture *m_Icon; + void ActivateLauncherIcon (); }; #endif // BAMFLAUNCHERICON_H diff --git a/src/StaticCairoText.cpp b/src/StaticCairoText.cpp index afc1c6821..b10cc6776 100644 --- a/src/StaticCairoText.cpp +++ b/src/StaticCairoText.cpp @@ -42,6 +42,8 @@ namespace nux _text = TEXT (text); _texture2D = 0; _need_new_extent_cache = true; + _pre_layout_width = 0; + _pre_layout_height = 0; SetMinimumSize (1, 1); _ellipsize = NUX_ELLIPSIZE_END; @@ -54,8 +56,7 @@ StaticCairoText::~StaticCairoText () GtkSettings* settings = gtk_settings_get_default (); // not ref'ed g_signal_handlers_disconnect_by_func (settings, (void *) &StaticCairoText::OnFontChanged, - this); - + this); if (_texture2D) _texture2D->UnReference (); @@ -155,20 +156,30 @@ StaticCairoText::Draw (GraphicsEngine& gfxContext, TexCoordXForm texxform; texxform.SetWrap (TEXWRAP_REPEAT, TEXWRAP_REPEAT); texxform.SetTexCoordType (TexCoordXForm::OFFSET_COORD); + + t_u32 alpha = 0, src = 0, dest = 0; - gfxContext.GetRenderStates ().SetBlend (true); - gfxContext.GetRenderStates ().SetPremultipliedBlend (nux::SRC_OVER); - - gfxContext.QRP_1Tex (base.x, - base.y, - base.width, - base.height, - _texture2D->GetDeviceTexture(), - texxform, - _textColor); + gfxContext.GetRenderStates ().GetBlend (alpha, src, dest); + gfxContext.GetRenderStates ().SetBlend (true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); - gfxContext.GetRenderStates().SetBlend (false); + Color col = Color::Black; + col.SetAlpha (0.0f); + gfxContext.QRP_Color (base.x, + base.y, + base.width, + base.height, + col); + gfxContext.QRP_1Tex (base.x, + base.y + ((base.height - _cached_extent_height)/2), + base.width, + base.height, + _texture2D->GetDeviceTexture(), + texxform, + _textColor); + + gfxContext.GetRenderStates ().SetBlend (alpha, src, dest); + gfxContext.PopClippingRectangle (); } @@ -220,6 +231,7 @@ StaticCairoText::SetFont (const char *fontstring) int width = 0; int height = 0; GetTextExtents (width, height); + SetMinimumHeight (height); NeedRedraw (); sigFontChanged.emit (this); } diff --git a/src/StaticCairoText.h b/src/StaticCairoText.h index 5314046c9..0edd008bf 100644 --- a/src/StaticCairoText.h +++ b/src/StaticCairoText.h @@ -106,7 +106,7 @@ namespace nux int _pre_layout_width; int _pre_layout_height; - + void GetTextExtents (const TCHAR* font, int& width, int& height); diff --git a/src/TimeMe.cpp b/src/TimeMe.cpp new file mode 100644 index 000000000..55819dbf8 --- /dev/null +++ b/src/TimeMe.cpp @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2010 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * 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/>. + * + * Authored by: Neil Jagdish Patel <neil.patel@canonical.com> + */ + +#include "TimeMe.h" + +gint64 _____last_time_____ = 0; +gint64 _____start_time_____ = 0; diff --git a/src/TimeMe.h b/src/TimeMe.h new file mode 100644 index 000000000..6482e4e34 --- /dev/null +++ b/src/TimeMe.h @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2010 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * 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/>. + * + * Authored by: Neil Jagdish Patel <neil.patel@canonical.com> + */ + +#ifndef _TIME_ME_H_ +#define _TIME_ME_H_ + +#include <glib.h> + +extern gint64 _____last_time_____; +extern gint64 _____start_time_____; + +#define TIME_ME_START(foo) { _____last_time_____ = g_get_monotonic_time (); _____start_time_____ = _____last_time_____; g_print ("\nSTARTED (%s)\n", foo);} + +#define TIME_ME_LOG(foo) { \ + gint64 ____now_time___ = g_get_monotonic_time (); \ + g_print ("%f: %s\n", (____now_time___ - _____last_time_____)/1000.0f, foo); \ + _____last_time_____ = ____now_time___; \ +} + +#define TIME_ME_FINSH(foo) { \ + gint64 ____now_time___ = g_get_monotonic_time (); \ + g_print ("\n%f: FINISHED (%s)\n", (____now_time___ - _____start_time_____)/1000.0f, foo); \ +} + +#define TIME_ME_FUNC() {_____last_time_____ = g_get_monotonic_time (); _____start_time_____ = _____last_time_____;} +#define TIME_ME_ENDFUNC() TIME_ME_FINSH(G_STRFUNC) + +#endif //_TIME_ME_H_ diff --git a/src/Tooltip.cpp b/src/Tooltip.cpp index 1c7cef6bf..14b3597d7 100644 --- a/src/Tooltip.cpp +++ b/src/Tooltip.cpp @@ -853,7 +853,7 @@ void ctk_surface_blur (cairo_surface_t* surface, _labelText = text; _tooltip_text->SetText (_labelText); - this->ComputeChildLayout (); + QueueRelayout (); } // Introspection diff --git a/src/TrashLauncherIcon.cpp b/src/TrashLauncherIcon.cpp index af1ddd32c..8d1c52952 100644 --- a/src/TrashLauncherIcon.cpp +++ b/src/TrashLauncherIcon.cpp @@ -34,7 +34,8 @@ TrashLauncherIcon::TrashLauncherIcon (Launcher* IconManager) SetIconName ("user-trash"); SetQuirk (QUIRK_VISIBLE, true); SetQuirk (QUIRK_RUNNING, false); - SetIconType (TYPE_TRASH); + SetIconType (TYPE_TRASH); + SetShortcut ('t'); m_TrashMonitor = g_file_monitor_directory (g_file_new_for_uri("trash:///"), G_FILE_MONITOR_NONE, @@ -95,14 +96,8 @@ TrashLauncherIcon::OnMouseClick (int button) SimpleLauncherIcon::OnMouseClick (button); if (button == 1) - { - GError *error = NULL; - - g_spawn_command_line_async ("xdg-open trash://", &error); + ActivateLauncherIcon (); - if (error) - g_error_free (error); - } else if (button == 3 && _empty == FALSE) { EnsureMenuItemsReady (); @@ -113,12 +108,23 @@ TrashLauncherIcon::OnMouseClick (int button) int tip_x = _launcher->GetBaseWidth () + 1; //icon_x + icon_w; nux::Point3 center = GetCenter (); - int tip_y = center.y; + int tip_y = center.y+ _launcher->GetParent ()->GetGeometry ().y; QuicklistManager::Default ()->ShowQuicklist (_quicklist, tip_x, tip_y); nux::GetWindowCompositor ().SetAlwaysOnFrontWindow (_quicklist); } } +void +TrashLauncherIcon::ActivateLauncherIcon () +{ + GError *error = NULL; + + g_spawn_command_line_async ("xdg-open trash://", &error); + + if (error) + g_error_free (error); +} + void TrashLauncherIcon::OnEmptyTrash(DbusmenuMenuitem *item, int time, TrashLauncherIcon *self) { diff --git a/src/TrashLauncherIcon.h b/src/TrashLauncherIcon.h index 46eba9f53..238a3e53e 100644 --- a/src/TrashLauncherIcon.h +++ b/src/TrashLauncherIcon.h @@ -44,6 +44,7 @@ private: GFileMonitor *m_TrashMonitor; gboolean _empty; + void ActivateLauncherIcon (); void EnsureMenuItemsReady (); static void UpdateTrashIconCb (GObject *source, GAsyncResult *res, gpointer data); diff --git a/src/UBusMessages.h b/src/UBusMessages.h index 2e6e36731..5cf1211ac 100644 --- a/src/UBusMessages.h +++ b/src/UBusMessages.h @@ -22,7 +22,7 @@ // Add ubus messages here so we can easily export them around the place // keep ordered -#define UBUS_HOME_BUTTON_ACTIVATED "PANEL_HOME_ACTIVATED" +#define UBUS_DASH_EXTERNAL_ACTIVATION "DASH_EXTERNAL_ACTIVATION" #define UBUS_HOME_BUTTON_TRIGGER_UPDATE "PANEL_HOME_BUTTON_TRIGGER_UPDATE" // When other parts of Unity want to close the place view @@ -39,8 +39,10 @@ // Signal send by Launcher/Quicklist when it wants to exit key-nav and wants to // get rid of keyboard-input-focus -#define UBUS_LAUNCHER_EXIT_KEY_NAV "LAUNCHER_EXIT_KEY_NAV" -#define UBUS_QUICKLIST_EXIT_KEY_NAV "QUICKLIST_EXIT_KEY_NAV" +#define UBUS_LAUNCHER_START_KEY_NAV "LAUNCHER_START_KEY_NAV" +#define UBUS_LAUNCHER_END_KEY_NAV "LAUNCHER_END_KEY_NAV" +#define UBUS_QUICKLIST_START_KEY_NAV "QUICKLIST_START_KEY_NAV" +#define UBUS_QUICKLIST_END_KEY_NAV "QUICKLIST_END_KEY_NAV" // Signal to send on icon action and that you want to request hiding the launcher #define UBUS_LAUNCHER_ACTION_DONE "LAUNCHER_ACTION_DONE" diff --git a/src/nux-object-accessible.cpp b/src/nux-object-accessible.cpp index 3d1964639..1b15a79af 100644 --- a/src/nux-object-accessible.cpp +++ b/src/nux-object-accessible.cpp @@ -30,13 +30,22 @@ #include "nux-object-accessible.h" +#include <sigc++/connection.h> + /* GObject */ static void nux_object_accessible_class_init (NuxObjectAccessibleClass *klass); static void nux_object_accessible_init (NuxObjectAccessible *object_accessible); +static void nux_object_accessible_finalize (GObject *object); /* AtkObject.h */ static void nux_object_accessible_initialize (AtkObject *accessible, - gpointer data); + gpointer data); +static AtkStateSet* nux_object_accessible_ref_state_set (AtkObject *accessible); + +/* Private methods */ +static void on_object_destroy_cb (nux::Object *base_object, + NuxObjectAccessible *object_accessible); + #define NUX_OBJECT_ACCESSIBLE_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NUX_TYPE_OBJECT_ACCESSIBLE, NuxObjectAccessiblePrivate)) @@ -46,6 +55,7 @@ G_DEFINE_TYPE (NuxObjectAccessible, nux_object_accessible, ATK_TYPE_OBJECT) struct _NuxObjectAccessiblePrivate { nux::Object *object; + sigc::connection on_destroyed_connection; }; static void @@ -54,8 +64,11 @@ nux_object_accessible_class_init (NuxObjectAccessibleClass *klass) GObjectClass *gobject_class = G_OBJECT_CLASS (klass); AtkObjectClass *atk_class = ATK_OBJECT_CLASS (klass); + gobject_class->finalize = nux_object_accessible_finalize; + /* AtkObject */ atk_class->initialize = nux_object_accessible_initialize; + atk_class->ref_state_set = nux_object_accessible_ref_state_set; g_type_class_add_private (gobject_class, sizeof (NuxObjectAccessiblePrivate)); } @@ -82,10 +95,20 @@ nux_object_accessible_new (nux::Object *object) return accessible; } +static void +nux_object_accessible_finalize (GObject *object) +{ + NuxObjectAccessible *self = NUX_OBJECT_ACCESSIBLE (object); + + self->priv->on_destroyed_connection.disconnect (); + + G_OBJECT_CLASS (nux_object_accessible_parent_class)->finalize (object); +} + /* AtkObject.h */ static void nux_object_accessible_initialize (AtkObject *accessible, - gpointer data) + gpointer data) { NuxObjectAccessible *self = NULL; nux::Object *object = NULL; @@ -93,10 +116,13 @@ nux_object_accessible_initialize (AtkObject *accessible, ATK_OBJECT_CLASS (nux_object_accessible_parent_class)->initialize (accessible, data); self = NUX_OBJECT_ACCESSIBLE (accessible); - object = (nux::Object*)data; + object = (nux::Object *) data; + + self->priv->object = object; + + self->priv->on_destroyed_connection = + object->OnDestroyed.connect (sigc::bind (sigc::ptr_fun (on_object_destroy_cb), self)); - self->priv->object = object; /* FIXME: object destruction management (for - the defunct state) */ accessible->role = ATK_ROLE_UNKNOWN; } @@ -115,3 +141,29 @@ nux_object_accessible_get_object (NuxObjectAccessible *self) { return self->priv->object; } + +static AtkStateSet* +nux_object_accessible_ref_state_set (AtkObject *obj) +{ + AtkStateSet *state_set = NULL; + + g_return_val_if_fail (NUX_IS_OBJECT_ACCESSIBLE (obj), NULL); + + state_set = ATK_OBJECT_CLASS (nux_object_accessible_parent_class)->ref_state_set (obj); + + if (NUX_OBJECT_ACCESSIBLE (obj)->priv->object == NULL) + atk_state_set_add_state (state_set, ATK_STATE_DEFUNCT); + + return state_set; +} + +/* Private methods */ +static void +on_object_destroy_cb (nux::Object *base_object, + NuxObjectAccessible *object_accessible) +{ + object_accessible->priv->object = NULL; + object_accessible->priv->on_destroyed_connection.disconnect (); + atk_object_notify_state_change (ATK_OBJECT (object_accessible), ATK_STATE_DEFUNCT, + TRUE); +} diff --git a/src/unitya11y.cpp b/src/unitya11y.cpp index ed66bb358..309c56fe4 100644 --- a/src/unitya11y.cpp +++ b/src/unitya11y.cpp @@ -20,6 +20,7 @@ #include <gio/gio.h> #include <gmodule.h> #include <stdio.h> +#include <gconf/gconf-client.h> #include "unitya11y.h" #include "unity-util-accessible.h" @@ -43,6 +44,11 @@ static GHashTable *accessible_table = NULL; static gboolean a11y_initialized = FALSE; +#define INIT_METHOD "gnome_accessibility_module_init" +#define A11Y_GCONF_KEY "/desktop/gnome/interface/accessibility" +#define AT_SPI_SCHEMA "org.a11y.atspi" +#define ATK_BRIDGE_LOCATION_KEY "atk-bridge-location" + static void unity_a11y_restore_environment (void) { @@ -56,12 +62,6 @@ load_unity_atk_util () g_type_class_unref (g_type_class_ref (UNITY_TYPE_UTIL_ACCESSIBLE)); } -#define INIT_METHOD "gnome_accessibility_module_init" -#define DESKTOP_SCHEMA "org.gnome.desktop.interface" -#define ACCESSIBILITY_ENABLED_KEY "accessibility" -#define AT_SPI_SCHEMA "org.a11y.atspi" -#define ATK_BRIDGE_LOCATION_KEY "atk-bridge-location" - static gboolean has_gsettings_schema (const gchar *schema) { @@ -87,16 +87,19 @@ has_gsettings_schema (const gchar *schema) static gboolean should_enable_a11y (void) { - GSettings *desktop_settings = NULL; + GConfClient *client = NULL; gboolean value = FALSE; + GError *error = NULL; - if (!has_gsettings_schema (DESKTOP_SCHEMA)) - return FALSE; - - desktop_settings = g_settings_new (DESKTOP_SCHEMA); - value = g_settings_get_boolean (desktop_settings, ACCESSIBILITY_ENABLED_KEY); - - g_object_unref (desktop_settings); + client = gconf_client_get_default (); + value = gconf_client_get_bool (client, A11Y_GCONF_KEY, &error); + if (error != NULL) + { + g_warning ("Error getting gconf variable %s, a11y disabled by default", + A11Y_GCONF_KEY); + g_error_free (error); + } + g_object_unref (client); return value; } @@ -154,6 +157,174 @@ a11y_invoke_module (const char *module_path) return TRUE; } + +/* + * This unit test checks if the destroy management is working: + * + * - If the state of a accessibility object is properly updated after + * the object destruction + * + */ +static gboolean +a11y_unit_test_destroy_management (void) +{ + QuicklistView *quicklist = NULL; + AtkObject *accessible = NULL; + nux::Object *base_object = NULL; + AtkStateSet *state_set = NULL; + + quicklist = new QuicklistView (); + quicklist->SinkReference (); + accessible = unity_a11y_get_accessible (quicklist); + + base_object = nux_object_accessible_get_object (NUX_OBJECT_ACCESSIBLE (accessible)); + if (base_object != quicklist) + { + g_debug ("[a11y] destroy management unit test: base object" + " different to the original one"); + return FALSE; + } + + if (quicklist->UnReference () == false) + { + g_debug ("[a11y] destroy management unit test: base object not destroyed"); + return FALSE; + } + + base_object = nux_object_accessible_get_object (NUX_OBJECT_ACCESSIBLE (accessible)); + if (base_object != NULL) + { + g_debug ("[a11y] destroy management unit test: base object" + " not NULL after base object destruction"); + return FALSE; + } + + state_set = atk_object_ref_state_set (accessible); + if (!atk_state_set_contains_state (state_set, ATK_STATE_DEFUNCT)) + { + g_debug ("[a11y] destroy management unit test: accessible object" + " doesn't include DEFUNCT state"); + return FALSE; + } + + g_object_unref (state_set); + g_object_unref (accessible); + + return TRUE; +} + +/** + * This unit test checks if the hash table destroy management is working: + * + * - If the hash table removes properly the accessible object once it + * is destroyed. + */ +static gboolean +a11y_unit_test_hash_table_destroy_management (void) +{ + QuicklistView *quicklist = NULL; + AtkObject *accessible = NULL; + guint prev_hash_size = 0; + guint hash_size = 0; + + /* test the hash table management with the accessible destroy */ + + prev_hash_size = g_hash_table_size (accessible_table); + + quicklist = new QuicklistView (); + quicklist->SinkReference (); + accessible = unity_a11y_get_accessible (quicklist); + + if (accessible == NULL) + { + g_debug ("[a11y] hash table destroy management unit test: error creating" + " the accessible object (accessible == NULL)"); + return FALSE; + } + + hash_size = g_hash_table_size (accessible_table); + + if ((hash_size - prev_hash_size) != 1 ) + { + g_debug ("[a11y] hash table destroy management unit test: accessible object" + " not added to the hash table after his creation"); + return FALSE; + } + + prev_hash_size = g_hash_table_size (accessible_table); + + g_object_unref (accessible); + + hash_size = g_hash_table_size (accessible_table); + + if ((prev_hash_size - hash_size) != 1 ) + { + g_debug ("[a11y] hash table destroy management unit test: accessible object" + " not removed from the hash table after his destruction"); + return FALSE; + } + + quicklist->UnReference (); + + /* Test the hash table management after the object destroy */ + + prev_hash_size = g_hash_table_size (accessible_table); + + quicklist = new QuicklistView (); + quicklist->SinkReference (); + accessible = unity_a11y_get_accessible (quicklist); + + if (accessible == NULL) + { + g_debug ("[a11y] hash table destroy management unit test: error creating" + " the accessible object (accessible == NULL)"); + return FALSE; + } + + hash_size = g_hash_table_size (accessible_table); + + if ((hash_size - prev_hash_size) != 1 ) + { + g_debug ("[a11y] hash table destroy management unit test: accessible object" + " not added to the hash table after his creation"); + return FALSE; + } + + prev_hash_size = g_hash_table_size (accessible_table); + + if (quicklist->UnReference () == false) + { + g_debug ("[a11y] hash table destroy management unit test: base object not destroyed"); + return FALSE; + } + + hash_size = g_hash_table_size (accessible_table); + + if ((prev_hash_size - hash_size) != 1 ) + { + g_debug ("[a11y] hash table destroy management unit test: accessible object" + " not removed from the hash table after base object destruction"); + return FALSE; + } + + return TRUE; +} + +void +unity_run_a11y_unit_tests (void) +{ + if (a11y_unit_test_destroy_management ()) + g_debug ("[a11y] destroy management unit test: SUCCESS"); + else + g_debug ("[a11y] destroy management unit test: FAIL"); + + if (a11y_unit_test_hash_table_destroy_management ()) + g_debug ("[a11y] hash table destroy management unit test: SUCCESS"); + else + g_debug ("[a11y] hash table destroy management unit test: FAIL"); +} + + /********************************************************************************/ /* * In order to avoid the atk-bridge loading and the GAIL @@ -268,6 +439,30 @@ unity_a11y_create_accessible (nux::Object *object) return nux_object_accessible_new (object); } +static void +on_object_destroy_cb (nux::Object *base_object, + AtkObject *accessible_object) +{ + /* NOTE: the pair key:value (base_object:accessible_object) could be + already removed on on_accessible_destroy_cb. That just mean that + g_hash_table_remove would return FALSE. We don't add a + debug/warning message to avoid being too verbose */ + + g_hash_table_remove (accessible_table, base_object); +} + +static void +on_accessible_destroy_cb (gpointer data, + GObject *where_the_object_was) +{ + /* NOTE: the pair key:value (base_object:accessible_object) could be + already removed on on_object_destroy_cb. That just mean that + g_hash_table_remove would return FALSE. We don't add a + debug/warning message to avoid being too verbose */ + + g_hash_table_remove (accessible_table, data); +} + /* * Returns the accessible object of a nux::View object * @@ -299,6 +494,17 @@ unity_a11y_get_accessible (nux::Object *object) accessible_object = unity_a11y_create_accessible (object); g_hash_table_insert (accessible_table, object, accessible_object); + + /* there are two reasons the object should be removed from the + * table: base object destroyed, or accessible object + * destroyed + */ + g_object_weak_ref (G_OBJECT (accessible_object), + on_accessible_destroy_cb, + object); + + object->OnDestroyed.connect (sigc::bind(sigc::ptr_fun (on_object_destroy_cb), + accessible_object)); } return accessible_object; diff --git a/src/unitya11y.h b/src/unitya11y.h index 7e0768407..9e646e101 100644 --- a/src/unitya11y.h +++ b/src/unitya11y.h @@ -27,7 +27,11 @@ void unity_a11y_preset_environment (void); void unity_a11y_init (void); void unity_a11y_finalize (void); + AtkObject *unity_a11y_get_accessible (nux::Object *object); + gboolean unity_a11y_initialized (void); +void unity_run_a11y_unit_tests (void); + #endif /* UNITY_A11Y_H */ diff --git a/src/unityshell.cpp b/src/unityshell.cpp index 9b754c1d7..b9f891583 100644 --- a/src/unityshell.cpp +++ b/src/unityshell.cpp @@ -188,7 +188,11 @@ UnityScreen::handleEvent (XEvent *event) PluginAdapter::Default ()->OnScreenGrabbed (); else if (event->xfocus.mode == NotifyUngrab) PluginAdapter::Default ()->OnScreenUngrabbed (); - + break; + case KeyPress: + KeySym key_sym; + if (XLookupString(&(event->xkey), NULL, 0, &key_sym, 0) > 0) + launcher->CheckSuperShortcutPressed (key_sym, 0, 0); break; } @@ -244,10 +248,19 @@ UnityScreen::showPanelFirstMenuKeyTerminate (CompAction *action, return false; } -bool -UnityScreen::setKeyboardFocusKeyInitiate (CompAction *action, - CompAction::State state, - CompOption::Vector &options) +void +UnityScreen::restartLauncherKeyNav () +{ + // set input-focus on launcher-window and start key-nav mode + if (newFocusedWindow != NULL) + { + newFocusedWindow->moveInputFocusTo (); + launcher->startKeyNavMode (); + } +} + +void +UnityScreen::startLauncherKeyNav () { // get CompWindow* of launcher-window newFocusedWindow = screen->findWindow (launcherWindow->GetInputWindowId ()); @@ -262,12 +275,28 @@ UnityScreen::setKeyboardFocusKeyInitiate (CompAction *action, newFocusedWindow->moveInputFocusTo (); launcher->startKeyNavMode (); } +} + +bool +UnityScreen::setKeyboardFocusKeyInitiate (CompAction *action, + CompAction::State state, + CompOption::Vector &options) +{ + startLauncherKeyNav (); return false; } void -UnityScreen::OnExitKeyNav (GVariant* data, void* value) +UnityScreen::OnLauncherStartKeyNav (GVariant* data, void* value) +{ + UnityScreen *self = (UnityScreen*) value; + + self->startLauncherKeyNav (); +} + +void +UnityScreen::OnLauncherEndKeyNav (GVariant* data, void* value) { UnityScreen *self = (UnityScreen*) value; @@ -277,6 +306,15 @@ UnityScreen::OnExitKeyNav (GVariant* data, void* value) self->lastFocusedWindow->moveInputFocusTo (); } +void +UnityScreen::OnQuicklistEndKeyNav (GVariant* data, + void* value) +{ + UnityScreen *self = (UnityScreen*) value; + + self->restartLauncherKeyNav (); +} + gboolean UnityScreen::initPluginActions (gpointer data) { @@ -595,9 +633,20 @@ UnityScreen::UnityScreen (CompScreen *screen) : optionSetPanelFirstMenuInitiate (boost::bind (&UnityScreen::showPanelFirstMenuKeyInitiate, this, _1, _2, _3)); optionSetPanelFirstMenuTerminate(boost::bind (&UnityScreen::showPanelFirstMenuKeyTerminate, this, _1, _2, _3)); - ubus_server_register_interest (ubus_server_get_default (), - UBUS_LAUNCHER_EXIT_KEY_NAV, - (UBusCallback)&UnityScreen::OnExitKeyNav, + UBusServer* ubus = ubus_server_get_default (); + ubus_server_register_interest (ubus, + UBUS_LAUNCHER_START_KEY_NAV, + (UBusCallback)&UnityScreen::OnLauncherStartKeyNav, + this); + + ubus_server_register_interest (ubus, + UBUS_LAUNCHER_END_KEY_NAV, + (UBusCallback)&UnityScreen::OnLauncherEndKeyNav, + this); + + ubus_server_register_interest (ubus, + UBUS_QUICKLIST_END_KEY_NAV, + (UBusCallback)&UnityScreen::OnQuicklistEndKeyNav, this); g_timeout_add (0, &UnityScreen::initPluginActions, this); @@ -652,7 +701,7 @@ void UnityScreen::initLauncher (nux::NThread* thread, void* InitData) self->launcherWindow->SetLayout(layout); self->launcherWindow->SetBackgroundColor(nux::Color(0x00000000)); self->launcherWindow->ShowWindow(true); - self->launcherWindow->EnableInputWindow(true, "launcher"); + self->launcherWindow->EnableInputWindow(true, "launcher", false, false); self->launcherWindow->InputWindowEnableStruts(true); /* FIXME: this should not be manual, should be managed with a @@ -683,7 +732,7 @@ void UnityScreen::initLauncher (nux::NThread* thread, void* InitData) self->panelWindow->SetLayout(layout); self->panelWindow->SetBackgroundColor(nux::Color(0x00000000)); self->panelWindow->ShowWindow(true); - self->panelWindow->EnableInputWindow(true, "panel"); + self->panelWindow->EnableInputWindow(true, "panel", false, false); self->panelWindow->InputWindowEnableStruts(true); /* FIXME: this should not be manual, should be managed with a diff --git a/src/unityshell.h b/src/unityshell.h index 58dc2b1c3..926b3cb68 100644 --- a/src/unityshell.h +++ b/src/unityshell.h @@ -161,8 +161,26 @@ class UnityScreen : strutHackTimeout (gpointer data); static void + OnStartKeyNav (GVariant* data, void* value); + + static void OnExitKeyNav (GVariant* data, void* value); - + + void + startLauncherKeyNav (); + + void + restartLauncherKeyNav (); + + static void + OnQuicklistEndKeyNav (GVariant* data, void* value); + + static void + OnLauncherStartKeyNav (GVariant* data, void* value); + + static void + OnLauncherEndKeyNav (GVariant* data, void* value); + Launcher *launcher; LauncherController *controller; PanelView *panelView; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6878004df..09df61207 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -103,6 +103,8 @@ add_executable (test-panel ../src/PanelHomeButton.h ../src/PanelMenuView.cpp ../src/PanelMenuView.h + ../src/TimeMe.cpp + ../src/TimeMe.h ../src/StaticCairoText.cpp ../src/StaticCairoText.h ../src/WindowButtons.cpp @@ -113,22 +115,37 @@ add_executable (test-panel ../src/ubus-server.h ) +set (PLACES_COMMON_SOURCE ../src/ubus-server.cpp + ../src/ubus-server.h + ../src/IconLoader.cpp + ../src/IconLoader.h + ../src/IconTexture.cpp + ../src/IconTexture.h + ../src/Introspectable.cpp + ../src/Introspectable.h + ../src/PlacesSettings.cpp + ../src/PlacesSettings.h + ../src/PlacesTile.cpp + ../src/PlacesTile.h + ../src/PlacesSimpleTile.cpp + ../src/PlacesSimpleTile.h + ../src/TextureCache.h + ../src/TextureCache.cpp + ../src/TimeMe.cpp + ../src/TimeMe.h + ../src/StaticCairoText.cpp + ../src/StaticCairoText.h + ../src/UBusMessages.h + ) add_executable (test-places TestPlaces.cpp - ../src/IconLoader.cpp - ../src/IconLoader.h - ../src/IconTexture.cpp - ../src/IconTexture.h + ${PLACES_COMMON_SOURCE} ../src/PlacesController.cpp ../src/PlacesController.h ../src/PlacesHomeView.cpp ../src/PlacesHomeView.h ../src/PlacesSearchBar.cpp ../src/PlacesSearchBar.h - ../src/PlacesSimpleTile.cpp - ../src/PlacesSimpleTile.h - ../src/PlacesTile.cpp - ../src/PlacesTile.h ../src/PlacesResultsController.cpp ../src/PlacesResultsController.h ../src/PlacesResultsView.h @@ -137,11 +154,6 @@ add_executable (test-places ../src/PlacesGroup.h ../src/PlacesView.cpp ../src/PlacesView.h - ../src/TextureCache.h - ../src/TextureCache.cpp - ../src/UBusMessages.h - ../src/Introspectable.cpp - ../src/Introspectable.h ../src/PlaceEntryHome.cpp ../src/PlaceEntryRemote.h ../src/PlaceEntryRemote.cpp @@ -154,73 +166,30 @@ add_executable (test-places ../src/PlaceRemote.cpp ../src/PlaceRemote.h ../src/Place.h - ../src/StaticCairoText.cpp - ../src/StaticCairoText.h - ../src/ubus-server.cpp - ../src/ubus-server.h ) add_executable (test-places-tiles TestPlacesTiles.cpp - ../src/IconLoader.cpp - ../src/IconLoader.h - ../src/PlacesTile.cpp - ../src/PlacesTile.h - ../src/PlacesSimpleTile.cpp - ../src/PlacesSimpleTile.h - ../src/StaticCairoText.cpp - ../src/StaticCairoText.h - ../src/IconTexture.cpp - ../src/IconTexture.h - ../src/Introspectable.cpp - ../src/Introspectable.h - ../src/TextureCache.h - ../src/TextureCache.cpp + ${PLACES_COMMON_SOURCE} ) add_executable (test-places-group TestPlacesGroup.cpp - ../src/IconLoader.cpp - ../src/IconLoader.h + ${PLACES_COMMON_SOURCE} ../src/PlacesGroup.cpp ../src/PlacesGroup.h - ../src/IconTexture.cpp - ../src/IconTexture.h - ../src/Introspectable.cpp - ../src/Introspectable.h - ../src/StaticCairoText.cpp - ../src/StaticCairoText.h - ../src/PlacesTile.cpp - ../src/PlacesTile.h - ../src/PlacesSimpleTile.cpp - ../src/PlacesSimpleTile.h - ../src/TextureCache.h - ../src/TextureCache.cpp ) add_executable (test-places-results TestPlacesResults.cpp - ../src/IconLoader.cpp - ../src/IconLoader.h + ${PLACES_COMMON_SOURCE} ../src/PlacesResultsController.cpp ../src/PlacesResultsController.h ../src/PlacesResultsView.h ../src/PlacesResultsView.cpp ../src/PlacesGroup.cpp ../src/PlacesGroup.h - ../src/PlacesTile.cpp - ../src/PlacesTile.h - ../src/PlacesSimpleTile.cpp - ../src/PlacesSimpleTile.h - ../src/IconTexture.cpp - ../src/IconTexture.h - ../src/Introspectable.cpp - ../src/Introspectable.h - ../src/StaticCairoText.cpp - ../src/StaticCairoText.h - ../src/TextureCache.h - ../src/TextureCache.cpp ) add_executable (test-quicklist @@ -241,6 +210,8 @@ add_executable (test-quicklist ../src/QuicklistMenuItemSeparator.h ../src/QuicklistView.cpp ../src/QuicklistView.h + ../src/ubus-server.cpp + ../src/ubus-server.h ) add_executable (test-places-backend diff --git a/unityshell.xml.in b/unityshell.xml.in index 7e2ceb56b..a7927346c 100644 --- a/unityshell.xml.in +++ b/unityshell.xml.in @@ -156,7 +156,7 @@ </desc> <desc> <value>1</value> - <_name>Side only</_name> + <_name>Slide only</_name> </desc> <desc> <value>2</value> |
