* adjust AboutSystem to fetch the system revision via
get_system_revision() instead of parsing it from utsname git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41480 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -47,6 +46,7 @@
|
||||
#include <AppMisc.h>
|
||||
#include <AutoDeleter.h>
|
||||
#include <cpu_type.h>
|
||||
#include <system_revision.h>
|
||||
|
||||
#include <Catalog.h>
|
||||
#include <Language.h>
|
||||
@@ -541,19 +541,14 @@ AboutView::AboutView()
|
||||
strlcpy(string, versionInfo.short_info, sizeof(string));
|
||||
}
|
||||
|
||||
// Add revision from uname() info
|
||||
utsname unameInfo;
|
||||
if (uname(&unameInfo) == 0) {
|
||||
long revision;
|
||||
if (sscanf(unameInfo.version, "r%ld", &revision) == 1) {
|
||||
char version[16];
|
||||
snprintf(version, sizeof(version), "%ld", revision);
|
||||
strlcat(string, " (", sizeof(string));
|
||||
strlcat(string, B_TRANSLATE("Revision"), sizeof(string));
|
||||
strlcat(string, " ", sizeof(string));
|
||||
strlcat(string, version, sizeof(string));
|
||||
strlcat(string, ")", sizeof(string));
|
||||
}
|
||||
// Add system revision
|
||||
const char* haikuRevision = get_system_revision();
|
||||
if (haikuRevision != NULL) {
|
||||
strlcat(string, " (", sizeof(string));
|
||||
strlcat(string, B_TRANSLATE("Revision"), sizeof(string));
|
||||
strlcat(string, " ", sizeof(string));
|
||||
strlcat(string, haikuRevision, sizeof(string));
|
||||
strlcat(string, ")", sizeof(string));
|
||||
}
|
||||
|
||||
BStringView* versionView = new BStringView("ostext", string);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SubDir HAIKU_TOP src apps aboutsystem ;
|
||||
|
||||
UsePrivateHeaders app shared ;
|
||||
UsePrivateHeaders app shared system ;
|
||||
|
||||
Application AboutSystem :
|
||||
AboutSystem.cpp
|
||||
|
||||
Reference in New Issue
Block a user