HaikuDepot: Add "Check for updates" item in Tools menu to open SoftwareUpdater.

This commit is contained in:
Augustin Cavalier 2017-12-16 13:50:13 -05:00
parent 77de2e81a1
commit d144f95270

View File

@ -68,6 +68,7 @@ enum {
MSG_MODEL_WORKER_DONE = 'mmwd',
MSG_REFRESH_REPOS = 'mrrp',
MSG_MANAGE_REPOS = 'mmrp',
MSG_SOFTWARE_UPDATER = 'mswu',
MSG_LOG_IN = 'lgin',
MSG_LOG_OUT = 'lgot',
MSG_AUTHORIZATION_CHANGED = 'athc',
@ -341,6 +342,10 @@ MainWindow::MessageReceived(BMessage* message)
be_roster->Launch("application/x-vnd.Haiku-Repositories");
break;
case MSG_SOFTWARE_UPDATER:
be_roster->Launch("application/x-vnd.haiku-softwareupdater");
break;
case MSG_LOG_IN:
_OpenLoginWindow(BMessage());
break;
@ -668,6 +673,8 @@ MainWindow::_BuildMenu(BMenuBar* menuBar)
new BMessage(MSG_REFRESH_REPOS)));
menu->AddItem(new BMenuItem(B_TRANSLATE("Manage repositories"
B_UTF8_ELLIPSIS), new BMessage(MSG_MANAGE_REPOS)));
menu->AddItem(new BMenuItem(B_TRANSLATE("Check for updates"
B_UTF8_ELLIPSIS), new BMessage(MSG_SOFTWARE_UPDATER)));
menuBar->AddItem(menu);