Changeset View
Changeset View
Standalone View
Standalone View
src/kaboutplugindialog.cpp
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Line(s) | |||||
67 | KAboutPluginDialog::~KAboutPluginDialog() | 67 | KAboutPluginDialog::~KAboutPluginDialog() | ||
68 | { | 68 | { | ||
69 | // The delegates want to be deleted before the items it created | 69 | // The delegates want to be deleted before the items it created | ||
70 | qDeleteAll(findChildren<KWidgetItemDelegate *>()); | 70 | qDeleteAll(findChildren<KWidgetItemDelegate *>()); | ||
71 | } | 71 | } | ||
72 | 72 | | |||
73 | void KAboutPluginDialogPrivate::init(KAboutPluginDialog::Options opt) | 73 | void KAboutPluginDialogPrivate::init(KAboutPluginDialog::Options opt) | ||
74 | { | 74 | { | ||
75 | q->setWindowTitle(i18n("About %1", pluginMetaData.name())); | 75 | q->setWindowTitle(i18nc("@title:window", "About %1", pluginMetaData.name())); | ||
76 | 76 | | |||
77 | //Set up the title widget... | 77 | //Set up the title widget... | ||
78 | const QIcon pluginIcon = !pluginMetaData.iconName().isEmpty() ? QIcon::fromTheme(pluginMetaData.iconName()) : | 78 | const QIcon pluginIcon = !pluginMetaData.iconName().isEmpty() ? QIcon::fromTheme(pluginMetaData.iconName()) : | ||
79 | qApp->windowIcon(); | 79 | qApp->windowIcon(); | ||
80 | QWidget *titleWidget = createTitleWidget(pluginIcon.pixmap(48, 48), | 80 | QWidget *titleWidget = createTitleWidget(pluginIcon.pixmap(48, 48), | ||
81 | pluginMetaData.name(), pluginMetaData.version(), q); | 81 | pluginMetaData.name(), pluginMetaData.version(), q); | ||
82 | 82 | | |||
83 | //Then the tab bar... | 83 | //Then the tab bar... | ||
84 | QTabWidget *tabWidget = new QTabWidget; | 84 | QTabWidget *tabWidget = new QTabWidget; | ||
85 | tabWidget->setUsesScrollButtons(false); | 85 | tabWidget->setUsesScrollButtons(false); | ||
86 | 86 | | |||
87 | //Set up the first page... | 87 | //Set up the first page... | ||
88 | QWidget *aboutWidget = createAboutWidget(pluginMetaData.description(), pluginMetaData.extraInformation(), | 88 | QWidget *aboutWidget = createAboutWidget(pluginMetaData.description(), pluginMetaData.extraInformation(), | ||
89 | pluginMetaData.copyrightText(), pluginMetaData.website(), | 89 | pluginMetaData.copyrightText(), pluginMetaData.website(), | ||
90 | {pluginLicense}, q); | 90 | {pluginLicense}, q); | ||
91 | 91 | | |||
92 | tabWidget->addTab(aboutWidget, i18n("About")); | 92 | tabWidget->addTab(aboutWidget, i18nc("@title:tab", "About")); | ||
93 | 93 | | |||
94 | //And here we go, authors page... | 94 | //And here we go, authors page... | ||
95 | const int authorCount = pluginMetaData.authors().count(); | 95 | const int authorCount = pluginMetaData.authors().count(); | ||
96 | if (authorCount) { | 96 | if (authorCount) { | ||
97 | // TODO: add bug report address to plugin metadata | 97 | // TODO: add bug report address to plugin metadata | ||
98 | QWidget *authorWidget = createAuthorsWidget(pluginMetaData.authors(), QString(), | 98 | QWidget *authorWidget = createAuthorsWidget(pluginMetaData.authors(), QString(), | ||
99 | false, | 99 | false, | ||
100 | QString(), | 100 | QString(), | ||
101 | QString(), q); | 101 | QString(), q); | ||
102 | 102 | | |||
103 | const QString authorPageTitle = i18np("Author", "Authors", authorCount); | 103 | const QString authorPageTitle = i18ncp("@title:tab", "Author", "Authors", authorCount); | ||
104 | tabWidget->addTab(authorWidget, authorPageTitle); | 104 | tabWidget->addTab(authorWidget, authorPageTitle); | ||
105 | } | 105 | } | ||
106 | 106 | | |||
107 | //And credits page... | 107 | //And credits page... | ||
108 | if (!pluginMetaData.otherContributors().isEmpty()) { | 108 | if (!pluginMetaData.otherContributors().isEmpty()) { | ||
109 | QWidget *creditWidget = createCreditWidget(pluginMetaData.otherContributors(), QString(), q); | 109 | QWidget *creditWidget = createCreditWidget(pluginMetaData.otherContributors(), QString(), q); | ||
110 | tabWidget->addTab(creditWidget, i18n("Thanks To")); | 110 | tabWidget->addTab(creditWidget, i18nc("@title:tab", "Thanks To")); | ||
111 | } | 111 | } | ||
112 | 112 | | |||
113 | //Finally, the optional translators page... | 113 | //Finally, the optional translators page... | ||
114 | if (!(opt & KAboutPluginDialog::HideTranslators) && !pluginMetaData.translators().isEmpty()) { | 114 | if (!(opt & KAboutPluginDialog::HideTranslators) && !pluginMetaData.translators().isEmpty()) { | ||
115 | QWidget *translatorWidget = createTranslatorsWidget(pluginMetaData.translators(), QString(), q); | 115 | QWidget *translatorWidget = createTranslatorsWidget(pluginMetaData.translators(), QString(), q); | ||
116 | tabWidget->addTab(translatorWidget, i18nc("@title:tab", "Translation")); | 116 | tabWidget->addTab(translatorWidget, i18nc("@title:tab", "Translation")); | ||
117 | } | 117 | } | ||
118 | 118 | | |||
119 | createForm(titleWidget, tabWidget, q); | 119 | createForm(titleWidget, tabWidget, q); | ||
120 | } | 120 | } |