Changeset View
Changeset View
Standalone View
Standalone View
src/mainwindow.cpp
Show First 20 Lines • Show All 190 Lines • ▼ Show 20 Line(s) | 179 | { | |||
---|---|---|---|---|---|
191 | a->setStatusTip(i18n("Create a new file")); | 191 | a->setStatusTip(i18n("Create a new file")); | ||
192 | a->setWhatsThis(i18n("New File: Create a new file")); | 192 | a->setWhatsThis(i18n("New File: Create a new file")); | ||
193 | 193 | | |||
194 | a = actionCollection()->addAction(KStandardAction::Open, "file_open", editor, SLOT(openFile())); | 194 | a = actionCollection()->addAction(KStandardAction::Open, "file_open", editor, SLOT(openFile())); | ||
195 | a->setStatusTip(i18n("Open an existing file")); | 195 | a->setStatusTip(i18n("Open an existing file")); | ||
196 | a->setWhatsThis(i18n("Open File: Open an existing file")); | 196 | a->setWhatsThis(i18n("Open File: Open an existing file")); | ||
197 | 197 | | |||
198 | //TODO: Is this correct? -- It doesn't seem to be working | 198 | //TODO: Is this correct? -- It doesn't seem to be working | ||
199 | recentFilesAction = (KRecentFilesAction*)actionCollection()->addAction(KStandardAction::OpenRecent, "file_recent", editor, SLOT(openFile(QUrl))); | 199 | recentFilesAction = dynamic_cast<KRecentFilesAction*>(actionCollection()->addAction(KStandardAction::OpenRecent, "file_recent", editor, SLOT(openFile(QUrl)))); | ||
200 | recentFilesAction->setStatusTip(i18n("Open a recently used file")); | 200 | recentFilesAction->setStatusTip(i18n("Open a recently used file")); | ||
201 | recentFilesAction->setWhatsThis(i18n("Open Recent File: Open a recently used file")); | 201 | recentFilesAction->setWhatsThis(i18n("Open Recent File: Open a recently used file")); | ||
202 | 202 | | |||
203 | a = new QAction(QIcon::fromTheme("get-hot-new-stuff"), i18n("Get more examples..."), this); | 203 | a = new QAction(QIcon::fromTheme("get-hot-new-stuff"), i18n("Get more examples..."), this); | ||
204 | actionCollection()->addAction("get_new_examples", a); | 204 | actionCollection()->addAction("get_new_examples", a); | ||
205 | a->setText(i18n("Get more examples...")); | 205 | a->setText(i18n("Get more examples...")); | ||
206 | connect(a, &QAction::triggered, this, &MainWindow::getNewExampleDialog); | 206 | connect(a, &QAction::triggered, this, &MainWindow::getNewExampleDialog); | ||
207 | 207 | | |||
▲ Show 20 Lines • Show All 886 Lines • Show Last 20 Lines |