diff options
| author | Peter Penz <[email protected]> | 2012-05-07 23:22:52 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-05-07 23:24:18 +0200 |
| commit | df99de642812cc7795b65b3788fbf81970e0ba7b (patch) | |
| tree | 1712dfb3bbcdd32291aeff1b3c8b0e18632131d5 /src/panels | |
| parent | a024e3e2aabf0f501707c8c5c0bdb25df6675b3a (diff) | |
Places Panel: Add missing translation strings
Provide a temporary dummy-implementation with the missing translation
strings, so that the translation-string-freeze gets respected.
Diffstat (limited to 'src/panels')
| -rw-r--r-- | src/panels/places/placesitemmodel.cpp | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp index aa0147e95..b4fc49c2c 100644 --- a/src/panels/places/placesitemmodel.cpp +++ b/src/panels/places/placesitemmodel.cpp @@ -38,10 +38,12 @@ #include <KBookmarkManager> #include <KComponentData> #include <KDebug> +#include <KIcon> #include <KLocale> #include <KStandardDirs> #include <KUser> #include "placesitem.h" +#include <QAction> #include <QDate> #include <Solid/Device> @@ -211,13 +213,39 @@ QString PlacesItemModel::groupName(const KUrl &url) const QAction* PlacesItemModel::ejectAction(int index) const { - Q_UNUSED(index); + // TODO: This is a dummy-implementation to have at least all + // translation-strings as part of the code before the freeze + QString iconName; + QString text; + QString label; + switch (index) { + case 0: + text = i18nc("@item", "Release '%1'", label); + break; + case 1: + text = i18nc("@item", "Safely Remove '%1'", label); + iconName = "media-eject"; + break; + case 2: + text = i18nc("@item", "Unmount '%1'", label); + iconName = "media-eject"; + break; + default: + break; + } + + //return new QAction(KIcon(iconName), text, 0); return 0; } QAction* PlacesItemModel::tearDownAction(int index) const { + // TODO: This is a dummy-implementation to have at least all + // translation-strings as part of the code before the freeze Q_UNUSED(index); + QString label; + QAction action(KIcon("media-eject"), i18nc("@item", "Eject '%1'", label), 0); + Q_UNUSED(action); return 0; } |
