Changeset View
Changeset View
Standalone View
Standalone View
src/Gui/KSMainWindow.cpp
Show First 20 Lines • Show All 224 Lines • ▼ Show 20 Line(s) | |||||
225 | void KSMainWindow::buildSaveMenu() | 225 | void KSMainWindow::buildSaveMenu() | ||
226 | { | 226 | { | ||
227 | // first clear the menu | 227 | // first clear the menu | ||
228 | mSaveMenu->clear(); | 228 | mSaveMenu->clear(); | ||
229 | 229 | | |||
230 | // get our actions in order | 230 | // get our actions in order | ||
231 | QAction *actionSave = KStandardAction::save(this, &KSMainWindow::save, this); | 231 | QAction *actionSave = KStandardAction::save(this, &KSMainWindow::save, this); | ||
232 | QAction *actionSaveAs = KStandardAction::saveAs(this, &KSMainWindow::saveAs, this); | 232 | QAction *actionSaveAs = KStandardAction::saveAs(this, &KSMainWindow::saveAs, this); | ||
233 | mSaveMenu->addAction(actionSaveAs); | ||||
234 | mSaveMenu->addAction(actionSave); | ||||
233 | 235 | | |||
234 | // put the actions in order | 236 | // put the actions in order | ||
235 | switch (saveButtonMode()) { | 237 | switch (saveButtonMode()) { | ||
236 | case SaveMode::SaveAs: | 238 | case SaveMode::SaveAs: | ||
237 | mSaveButton->setDefaultAction(actionSaveAs); | 239 | mSaveButton->setDefaultAction(actionSaveAs); | ||
238 | mSaveMenu->addAction(actionSave); | | |||
239 | break; | 240 | break; | ||
240 | case SaveMode::Save: | 241 | case SaveMode::Save: | ||
241 | mSaveButton->setDefaultAction(actionSave); | 242 | mSaveButton->setDefaultAction(actionSave); | ||
242 | mSaveMenu->addAction(actionSaveAs); | | |||
243 | break; | 243 | break; | ||
244 | } | 244 | } | ||
245 | } | 245 | } | ||
246 | 246 | | |||
247 | // overrides | 247 | // overrides | ||
248 | 248 | | |||
249 | void KSMainWindow::moveEvent(QMoveEvent *event) | 249 | void KSMainWindow::moveEvent(QMoveEvent *event) | ||
250 | { | 250 | { | ||
▲ Show 20 Lines • Show All 120 Lines • Show Last 20 Lines |