Changeset View
Changeset View
Standalone View
Standalone View
src/playlist/layouts/LayoutManager.cpp
Show All 15 Lines | |||||
16 | * this program. If not, see <http://www.gnu.org/licenses/>. * | 16 | * this program. If not, see <http://www.gnu.org/licenses/>. * | ||
17 | ****************************************************************************************/ | 17 | ****************************************************************************************/ | ||
18 | 18 | | |||
19 | #include "LayoutManager.h" | 19 | #include "LayoutManager.h" | ||
20 | 20 | | |||
21 | #include "core/support/Amarok.h" | 21 | #include "core/support/Amarok.h" | ||
22 | #include "core/support/Components.h" | 22 | #include "core/support/Components.h" | ||
23 | #include "core/support/Debug.h" | 23 | #include "core/support/Debug.h" | ||
24 | #include "core/interfaces/Logger.h" | 24 | #include "core/logger/Logger.h" | ||
25 | #include "playlist/PlaylistDefines.h" | 25 | #include "playlist/PlaylistDefines.h" | ||
26 | #include "playlist/PlaylistModelStack.h" | 26 | #include "playlist/PlaylistModelStack.h" | ||
27 | 27 | | |||
28 | #include <KConfigGroup> | 28 | #include <KConfigGroup> | ||
29 | #include <KMessageBox> | 29 | #include <KMessageBox> | ||
30 | 30 | | |||
31 | #include <QDir> | 31 | #include <QDir> | ||
32 | #include <QDomDocument> | 32 | #include <QDomDocument> | ||
▲ Show 20 Lines • Show All 78 Lines • ▼ Show 20 Line(s) | 105 | { | |||
111 | QStringList existingLayouts = LayoutManager::instance()->layouts(); | 111 | QStringList existingLayouts = LayoutManager::instance()->layouts(); | ||
112 | while( existingLayouts.contains( newLayoutName ) ) | 112 | while( existingLayouts.contains( newLayoutName ) ) | ||
113 | { | 113 | { | ||
114 | copyNumber++; | 114 | copyNumber++; | ||
115 | newLayoutName = i18nc( "adds a copy number to a generated name if the name already exists, for instance 'copy of Foo 2' if 'copy of Foo' is taken", "%1 %2", orgCopyName, copyNumber ); | 115 | newLayoutName = i18nc( "adds a copy number to a generated name if the name already exists, for instance 'copy of Foo 2' if 'copy of Foo' is taken", "%1 %2", orgCopyName, copyNumber ); | ||
116 | } | 116 | } | ||
117 | 117 | | |||
118 | 118 | | |||
119 | Amarok::Components::logger()->longMessage( i18n( "Current layout '%1' is read only. " \ | 119 | Amarok::Logger::longMessage( i18n( "Current layout '%1' is read only. " \ | ||
120 | "Creating a new layout '%2' with your changes and setting this as active", | 120 | "Creating a new layout '%2' with your changes and setting this as active", | ||
121 | m_activeLayout, newLayoutName ) | 121 | m_activeLayout, newLayoutName ) | ||
122 | ); | 122 | ); | ||
123 | 123 | | |||
124 | addUserLayout( newLayoutName, layout ); | 124 | addUserLayout( newLayoutName, layout ); | ||
125 | setActiveLayout( newLayoutName ); | 125 | setActiveLayout( newLayoutName ); | ||
126 | } | 126 | } | ||
127 | } | 127 | } | ||
▲ Show 20 Lines • Show All 370 Lines • Show Last 20 Lines |