-- (void) setConfigurationData:(NSString *)data {
- static Pcre conffile_r("^'(.*)' '(.*)' ([01]) ([01])$");
-
- if (!conffile_r(data)) {
- lprintf("E:invalid conffile\n");
- return;
- }
-
- NSString *ofile = conffile_r[1];
- //NSString *nfile = conffile_r[2];
-
- UIAlertView *alert = [[[UIAlertView alloc]
- initWithTitle:UCLocalize("CONFIGURATION_UPGRADE")
- message:[NSString stringWithFormat:@"%@\n\n%@", UCLocalize("CONFIGURATION_UPGRADE_EX"), ofile]
- delegate:self
- cancelButtonTitle:UCLocalize("KEEP_OLD_COPY")
- otherButtonTitles:
- UCLocalize("ACCEPT_NEW_COPY"),
- // XXX: UCLocalize("SEE_WHAT_CHANGED"),
- nil
- ] autorelease];
-
- [alert setContext:@"conffile"];
- [alert show];
-}
-
-- (void) setProgressTitle:(NSString *)title {
- NSMutableArray *words([[title componentsSeparatedByString:@" "] mutableCopy]);
- for (size_t i(0), e([words count]); i != e; ++i) {
- NSString *word([words objectAtIndex:i]);
- if (Package *package = [database_ packageWithName:word])
- [words replaceObjectAtIndex:i withObject:[package name]];
- }
-
- [status_ setText:[words componentsJoinedByString:@" "]];
-}
-