* Added info about the graphics device as suggested in #5112. However, it's
currently only shown in the monitor tool tip, that is now feels a bit crowded, so a better solution would be nice. I'm hesitant to give it a more prominent position, though, unless one has proof-read what the accelerants actually return here. * Added missing space between the serial number of the monitor and the date it has been produced. * Renamed fTempScreenMode to fUndoScreenMode, as it's only used to deliver that functionality. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34659 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
996953e91c
commit
61c5c89b6d
|
@ -533,6 +533,14 @@ ScreenMode::GetMonitorInfo(monitor_info& info, float* _diagonalInches)
|
|||
}
|
||||
|
||||
|
||||
status_t
|
||||
ScreenMode::GetDeviceInfo(accelerant_device_info& info)
|
||||
{
|
||||
BScreen screen(fWindow);
|
||||
return screen.GetDeviceInfo(&info);
|
||||
}
|
||||
|
||||
|
||||
screen_mode
|
||||
ScreenMode::ModeAt(int32 index)
|
||||
{
|
||||
|
|
|
@ -56,6 +56,8 @@ public:
|
|||
status_t GetMonitorInfo(monitor_info& info,
|
||||
float* _diagonalInches = NULL);
|
||||
|
||||
status_t GetDeviceInfo(accelerant_device_info& info);
|
||||
|
||||
screen_mode ModeAt(int32 index);
|
||||
int32 CountModes();
|
||||
|
||||
|
|
|
@ -165,7 +165,7 @@ ScreenWindow::ScreenWindow(ScreenSettings* settings)
|
|||
B_ALL_WORKSPACES),
|
||||
fBootWorkspaceApplied(false),
|
||||
fScreenMode(this),
|
||||
fTempScreenMode(this),
|
||||
fUndoScreenMode(this),
|
||||
fModified(false)
|
||||
{
|
||||
BScreen screen(this);
|
||||
|
@ -1034,7 +1034,7 @@ ScreenWindow::MessageReceived(BMessage* message)
|
|||
}
|
||||
|
||||
case BUTTON_UNDO_MSG:
|
||||
fTempScreenMode.Revert();
|
||||
fUndoScreenMode.Revert();
|
||||
_UpdateActiveMode();
|
||||
break;
|
||||
|
||||
|
@ -1216,9 +1216,26 @@ ScreenWindow::_UpdateMonitor()
|
|||
if (info.produced.week != 0 && info.produced.year != 0
|
||||
&& length < sizeof(text)) {
|
||||
length += snprintf(text + length, sizeof(text) - length,
|
||||
"(%u/%u)", info.produced.week, info.produced.year);
|
||||
" (%u/%u)", info.produced.week, info.produced.year);
|
||||
}
|
||||
}
|
||||
|
||||
// Add info about the graphics device
|
||||
|
||||
accelerant_device_info deviceInfo;
|
||||
if (fScreenMode.GetDeviceInfo(deviceInfo) == B_OK
|
||||
&& length < sizeof(text)) {
|
||||
if (deviceInfo.name[0] && deviceInfo.chipset[0]) {
|
||||
length += snprintf(text + length, sizeof(text) - length,
|
||||
"%s%s (%s)", length != 0 ? "\n\n" : "", deviceInfo.name,
|
||||
deviceInfo.chipset);
|
||||
} else if (deviceInfo.name[0] || deviceInfo.chipset[0]) {
|
||||
length += snprintf(text + length, sizeof(text) - length,
|
||||
"%s%s", length != 0 ? "\n\n" : "", deviceInfo.name[0]
|
||||
? deviceInfo.name : deviceInfo.chipset);
|
||||
}
|
||||
}
|
||||
|
||||
if (text[0])
|
||||
fMonitorView->SetToolTip(text);
|
||||
}
|
||||
|
@ -1237,7 +1254,8 @@ void
|
|||
ScreenWindow::_Apply()
|
||||
{
|
||||
// make checkpoint, so we can undo these changes
|
||||
fTempScreenMode.UpdateOriginalModes();
|
||||
fUndoScreenMode.UpdateOriginalModes();
|
||||
|
||||
status_t status = fScreenMode.Set(fSelected);
|
||||
if (status == B_OK) {
|
||||
// use the mode that has eventually been set and
|
||||
|
|
|
@ -102,12 +102,15 @@ private:
|
|||
|
||||
BButton* fBackgroundsButton;
|
||||
|
||||
ScreenMode fScreenMode, fTempScreenMode;
|
||||
ScreenMode fScreenMode;
|
||||
ScreenMode fUndoScreenMode;
|
||||
// screen modes for all workspaces
|
||||
uint32 fOriginalWorkspacesColumns;
|
||||
uint32 fOriginalWorkspacesRows;
|
||||
|
||||
screen_mode fActive, fSelected, fOriginal;
|
||||
// screen modes for the current workspace
|
||||
|
||||
uint32 fOriginalWorkspacesColumns;
|
||||
uint32 fOriginalWorkspacesRows;
|
||||
bool fModified;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue