[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    [krita] plugins/dockers/animation: Add i18n to the popup menus in Krita's Timeline Docker
From:       Dmitry Kazakov <dimula73 () gmail ! com>
Date:       2016-05-05 8:33:47
Message-ID: E1ayEjD-0007m9-Jn () scm ! kde ! org
[Download RAW message or body]

Git commit 0974f204dfecdcd4e66b15f090c34492e1543f4d by Dmitry Kazakov.
Committed on 05/05/2016 at 08:33.
Pushed by dkazakov into branch 'master'.

Add i18n to the popup menus in Krita's Timeline Docker

I forgot to do that initially :(

CC:kde-i18n-doc@kde.org

M  +4    -0    plugins/dockers/animation/kis_animation_utils.cpp
M  +4    -0    plugins/dockers/animation/kis_animation_utils.h
M  +3    -3    plugins/dockers/animation/timeline_frames_view.cpp

http://commits.kde.org/krita/0974f204dfecdcd4e66b15f090c34492e1543f4d

diff --git a/plugins/dockers/animation/kis_animation_utils.cpp \
b/plugins/dockers/animation/kis_animation_utils.cpp index 257c527..f9f8d78 100644
--- a/plugins/dockers/animation/kis_animation_utils.cpp
+++ b/plugins/dockers/animation/kis_animation_utils.cpp
@@ -39,6 +39,10 @@ namespace KisAnimationUtils {
     const QString dropFramesActionName = i18n("Drop Frames");
     const QString showLayerActionName = i18n("Show in Timeline");
 
+    const QString newLayerActionName = i18n("New Layer");
+    const QString addExistingLayerActionName = i18n("Add Existing Layer");
+    const QString removeLayerActionName = i18n("Remove Layer");
+
 
     bool createKeyframeLazy(KisImageSP image, KisNodeSP node, int time, bool copy) {
         KisKeyframeChannel *content =
diff --git a/plugins/dockers/animation/kis_animation_utils.h \
b/plugins/dockers/animation/kis_animation_utils.h index 63e3fb6..bda389f 100644
--- a/plugins/dockers/animation/kis_animation_utils.h
+++ b/plugins/dockers/animation/kis_animation_utils.h
@@ -54,6 +54,10 @@ namespace KisAnimationUtils
     extern const QString lazyFrameCreationActionName;
     extern const QString dropFramesActionName;
     extern const QString showLayerActionName;
+
+    extern const QString newLayerActionName;
+    extern const QString addExistingLayerActionName;
+    extern const QString removeLayerActionName;
 };
 
 #endif /* __KIS_ANIMATION_UTILS_H */
diff --git a/plugins/dockers/animation/timeline_frames_view.cpp \
b/plugins/dockers/animation/timeline_frames_view.cpp index 0e1b5c7..0ce0e13 100644
--- a/plugins/dockers/animation/timeline_frames_view.cpp
+++ b/plugins/dockers/animation/timeline_frames_view.cpp
@@ -155,8 +155,8 @@ TimelineFramesView::TimelineFramesView(QWidget *parent)
     m_d->addLayersButton->setPopupMode(QToolButton::InstantPopup);
 
     m_d->layerEditingMenu = new QMenu(this);
-    m_d->layerEditingMenu->addAction("New Layer", this, SLOT(slotAddNewLayer()));
-    m_d->existingLayersMenu = m_d->layerEditingMenu->addMenu("Add Existing Layer");
+    m_d->layerEditingMenu->addAction(KisAnimationUtils::newLayerActionName, this, \
SLOT(slotAddNewLayer())); +    m_d->existingLayersMenu = \
m_d->layerEditingMenu->addMenu(KisAnimationUtils::addExistingLayerActionName);  \
m_d->layerEditingMenu->addSeparator();  
     m_d->showHideLayerAction = new KisAction(KisAnimationUtils::showLayerActionName, \
this); @@ -166,7 +166,7 @@ TimelineFramesView::TimelineFramesView(QWidget *parent)
     m_d->globalActions.insert("show_in_timeline", m_d->showHideLayerAction);
     m_d->layerEditingMenu->addAction(m_d->showHideLayerAction);
 
-    m_d->layerEditingMenu->addAction("Remove Layer", this, SLOT(slotRemoveLayer()));
+    m_d->layerEditingMenu->addAction(KisAnimationUtils::removeLayerActionName, this, \
SLOT(slotRemoveLayer()));  
     connect(m_d->existingLayersMenu, SIGNAL(aboutToShow()), \
                SLOT(slotUpdateLayersMenu()));
     connect(m_d->existingLayersMenu, SIGNAL(triggered(QAction*)), \
SLOT(slotAddExistingLayer(QAction*)));


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic