| 1 | /* fre:ac - free audio converter |
| 2 | * Copyright (C) 2001-2021 Robert Kausch <[email protected]> |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation, either version 2 of |
| 7 | * the License, or (at your option) any later version. |
| 8 | * |
| 9 | * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR |
| 10 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED |
| 11 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ |
| 12 | |
| 13 | #include "tagedit.h" |
| 14 | #include "config.h" |
| 15 | |
| 16 | const String &BoCA::TagEdit::GetComponentSpecs() |
| 17 | { |
| 18 | I18n *i18n = I18n::Get(); |
| 19 | |
| 20 | i18n->SetContext("Components::Extensions"); |
| 21 | |
| 22 | static String componentSpecs = String(" \ |
| 23 | \ |
| 24 | <?xml version=\"1.0\" encoding=\"UTF-8\"?> \ |
| 25 | <component> \ |
| 26 | <name>").Append(i18n->TranslateString("Tag Editor")).Append("</name> \ |
| 27 | <version>1.0</version> \ |
| 28 | <id>tagedit-ext</id> \ |
| 29 | <type>extension</type> \ |
| 30 | </component> \ |
| 31 | \ |
| 32 | "); |
| 33 | |
| 34 | return componentSpecs; |
| 35 | } |
| 36 | |
| 37 | BoCA::TagEdit::TagEdit() |
| 38 | { |
| 39 | configLayer = NIL; |
| 40 | mainTabLayer = NIL; |
| 41 | |
| 42 | getMainTabLayer.Connect(&TagEdit::GetMainTabLayer, this); |
| 43 | } |
| 44 | |
| 45 | BoCA::TagEdit::~TagEdit() |
| 46 | { |
| 47 | if (configLayer != NIL) Object::DeleteObject(configLayer); |
| 48 | if (mainTabLayer != NIL) Object::DeleteObject(mainTabLayer); |
| 49 | } |
| 50 | |
| 51 | ConfigLayer *BoCA::TagEdit::GetConfigurationLayer() |
| 52 | { |
| 53 | if (configLayer == NIL) configLayer = new ConfigureTagEdit(); |
| 54 | |
| 55 | return configLayer; |
| 56 | } |
| 57 | |
| 58 | Layer *BoCA::TagEdit::GetMainTabLayer() |
| 59 | { |
| 60 | if (mainTabLayer == NIL) mainTabLayer = new LayerTags(); |
| 61 | |
| 62 | return mainTabLayer; |
| 63 | } |