SoftwareUpdater: Default to "full-sync" instead of "update".
Fixes #15899.
This commit is contained in:
@@ -47,7 +47,7 @@ SoftwareUpdaterApp::SoftwareUpdaterApp()
|
|||||||
BApplication(kAppSignature),
|
BApplication(kAppSignature),
|
||||||
fWorker(NULL),
|
fWorker(NULL),
|
||||||
fFinalQuitFlag(false),
|
fFinalQuitFlag(false),
|
||||||
fActionRequested(UPDATE),
|
fActionRequested(FULLSYNC),
|
||||||
fVerbose(false),
|
fVerbose(false),
|
||||||
fArgvsAccepted(true)
|
fArgvsAccepted(true)
|
||||||
{
|
{
|
||||||
@@ -68,7 +68,7 @@ SoftwareUpdaterApp::QuitRequested()
|
|||||||
{
|
{
|
||||||
if (fFinalQuitFlag)
|
if (fFinalQuitFlag)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Simulate a cancel request from window- this gives the updater a chance
|
// Simulate a cancel request from window- this gives the updater a chance
|
||||||
// to quit cleanly
|
// to quit cleanly
|
||||||
if (fWindowMessenger.IsValid())
|
if (fWindowMessenger.IsValid())
|
||||||
@@ -82,7 +82,7 @@ SoftwareUpdaterApp::ReadyToRun()
|
|||||||
{
|
{
|
||||||
// Argvs no longer accepted once the process starts
|
// Argvs no longer accepted once the process starts
|
||||||
fArgvsAccepted = false;
|
fArgvsAccepted = false;
|
||||||
|
|
||||||
fWorker = new WorkingLooper(fActionRequested, fVerbose);
|
fWorker = new WorkingLooper(fActionRequested, fVerbose);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ SoftwareUpdaterApp::ArgvReceived(int32 argc, char **argv)
|
|||||||
stderr);
|
stderr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int c;
|
int c;
|
||||||
while ((c = getopt_long(argc, argv, "hv", kLongOptions, NULL)) != -1) {
|
while ((c = getopt_long(argc, argv, "hv", kLongOptions, NULL)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
@@ -114,7 +114,7 @@ SoftwareUpdaterApp::ArgvReceived(int32 argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* command = "";
|
const char* command = "";
|
||||||
int32 argCount = argc - optind;
|
int32 argCount = argc - optind;
|
||||||
if (argCount == 0)
|
if (argCount == 0)
|
||||||
@@ -124,7 +124,7 @@ SoftwareUpdaterApp::ArgvReceived(int32 argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
} else
|
} else
|
||||||
command = argv[optind];
|
command = argv[optind];
|
||||||
|
|
||||||
fActionRequested = USER_SELECTION_NEEDED;
|
fActionRequested = USER_SELECTION_NEEDED;
|
||||||
if (strcmp("update", command) == 0)
|
if (strcmp("update", command) == 0)
|
||||||
fActionRequested = UPDATE;
|
fActionRequested = UPDATE;
|
||||||
@@ -148,12 +148,12 @@ SoftwareUpdaterApp::MessageReceived(BMessage* message)
|
|||||||
case kMsgRegister:
|
case kMsgRegister:
|
||||||
message->FindMessenger(kKeyMessenger, &fWindowMessenger);
|
message->FindMessenger(kKeyMessenger, &fWindowMessenger);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kMsgFinalQuit:
|
case kMsgFinalQuit:
|
||||||
fFinalQuitFlag = true;
|
fFinalQuitFlag = true;
|
||||||
PostMessage(B_QUIT_REQUESTED);
|
PostMessage(B_QUIT_REQUESTED);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
BApplication::MessageReceived(message);
|
BApplication::MessageReceived(message);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user