Patch by John Scipione:
"Show Application Expander" and "Expand New Applications" in the Deskbar preferences only work in Expando mode, however, this is not communicated to the user. This ticket contains a patch which disables these options in the preference window when not in expando mode and re-enables them in expando mode. This fixes ticket #7177. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40326 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ee5ecb929e
commit
38bda6536f
@ -334,6 +334,10 @@ TBarApp::MessageReceived(BMessage* message)
|
||||
ShowPreferencesWindow();
|
||||
break;
|
||||
|
||||
case kStateChanged:
|
||||
fPreferencesWindow->PostMessage(kStateChanged);
|
||||
break;
|
||||
|
||||
case kShowBeMenu:
|
||||
if (fBarWindow->Lock()) {
|
||||
fBarWindow->ShowBeMenu();
|
||||
|
@ -433,12 +433,20 @@ TBarView::ChangeState(int32 state, bool vertical, bool left, bool top)
|
||||
{
|
||||
bool vertSwap = (fVertical != vertical);
|
||||
bool leftSwap = (fLeft != left);
|
||||
bool stateChanged = (fState != state);
|
||||
|
||||
fState = state;
|
||||
fVertical = vertical;
|
||||
fLeft = left;
|
||||
fTop = top;
|
||||
|
||||
// Send a message to the preferences window to let it know to enable
|
||||
// or disabled preference items
|
||||
if (stateChanged || vertSwap) {
|
||||
BMessage message(kStateChanged);
|
||||
be_app->PostMessage(&message);
|
||||
}
|
||||
|
||||
BRect screenFrame = (BScreen(Window())).Frame();
|
||||
|
||||
PlaceBeMenu();
|
||||
|
@ -242,6 +242,10 @@ PreferencesWindow::MessageReceived(BMessage* message)
|
||||
be_app->PostMessage(message);
|
||||
break;
|
||||
|
||||
case kStateChanged:
|
||||
_EnableDisableDependentItems();
|
||||
break;
|
||||
|
||||
default:
|
||||
BWindow::MessageReceived(message);
|
||||
break;
|
||||
@ -275,10 +279,15 @@ PreferencesWindow::_UpdateRecentCounts()
|
||||
void
|
||||
PreferencesWindow::_EnableDisableDependentItems()
|
||||
{
|
||||
if (fAppsShowExpanders->Value())
|
||||
fAppsExpandNew->SetEnabled(true);
|
||||
else
|
||||
TBarApp* barApp = static_cast<TBarApp*>(be_app);
|
||||
if (barApp->BarView()->Vertical()
|
||||
&& barApp->BarView()->Expando()) {
|
||||
fAppsShowExpanders->SetEnabled(true);
|
||||
fAppsExpandNew->SetEnabled(fAppsShowExpanders->Value());
|
||||
} else {
|
||||
fAppsShowExpanders->SetEnabled(false);
|
||||
fAppsExpandNew->SetEnabled(false);
|
||||
}
|
||||
|
||||
if (fMenuRecentDocuments->Value())
|
||||
fMenuRecentDocumentCount->SetEnabled(true);
|
||||
|
@ -19,6 +19,7 @@ const uint32 kConfigShow = 'show';
|
||||
const uint32 kConfigClose = 'canc';
|
||||
const uint32 kUpdateRecentCounts = 'upct';
|
||||
const uint32 kEditMenuInTracker = 'mtrk';
|
||||
const uint32 kStateChanged = 'stch';
|
||||
|
||||
|
||||
class PreferencesWindow : public BWindow
|
||||
|
Loading…
Reference in New Issue
Block a user