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();
|
ShowPreferencesWindow();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case kStateChanged:
|
||||||
|
fPreferencesWindow->PostMessage(kStateChanged);
|
||||||
|
break;
|
||||||
|
|
||||||
case kShowBeMenu:
|
case kShowBeMenu:
|
||||||
if (fBarWindow->Lock()) {
|
if (fBarWindow->Lock()) {
|
||||||
fBarWindow->ShowBeMenu();
|
fBarWindow->ShowBeMenu();
|
||||||
|
@ -433,12 +433,20 @@ TBarView::ChangeState(int32 state, bool vertical, bool left, bool top)
|
|||||||
{
|
{
|
||||||
bool vertSwap = (fVertical != vertical);
|
bool vertSwap = (fVertical != vertical);
|
||||||
bool leftSwap = (fLeft != left);
|
bool leftSwap = (fLeft != left);
|
||||||
|
bool stateChanged = (fState != state);
|
||||||
|
|
||||||
fState = state;
|
fState = state;
|
||||||
fVertical = vertical;
|
fVertical = vertical;
|
||||||
fLeft = left;
|
fLeft = left;
|
||||||
fTop = top;
|
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();
|
BRect screenFrame = (BScreen(Window())).Frame();
|
||||||
|
|
||||||
PlaceBeMenu();
|
PlaceBeMenu();
|
||||||
|
@ -242,6 +242,10 @@ PreferencesWindow::MessageReceived(BMessage* message)
|
|||||||
be_app->PostMessage(message);
|
be_app->PostMessage(message);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case kStateChanged:
|
||||||
|
_EnableDisableDependentItems();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
BWindow::MessageReceived(message);
|
BWindow::MessageReceived(message);
|
||||||
break;
|
break;
|
||||||
@ -275,10 +279,15 @@ PreferencesWindow::_UpdateRecentCounts()
|
|||||||
void
|
void
|
||||||
PreferencesWindow::_EnableDisableDependentItems()
|
PreferencesWindow::_EnableDisableDependentItems()
|
||||||
{
|
{
|
||||||
if (fAppsShowExpanders->Value())
|
TBarApp* barApp = static_cast<TBarApp*>(be_app);
|
||||||
fAppsExpandNew->SetEnabled(true);
|
if (barApp->BarView()->Vertical()
|
||||||
else
|
&& barApp->BarView()->Expando()) {
|
||||||
|
fAppsShowExpanders->SetEnabled(true);
|
||||||
|
fAppsExpandNew->SetEnabled(fAppsShowExpanders->Value());
|
||||||
|
} else {
|
||||||
|
fAppsShowExpanders->SetEnabled(false);
|
||||||
fAppsExpandNew->SetEnabled(false);
|
fAppsExpandNew->SetEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
if (fMenuRecentDocuments->Value())
|
if (fMenuRecentDocuments->Value())
|
||||||
fMenuRecentDocumentCount->SetEnabled(true);
|
fMenuRecentDocumentCount->SetEnabled(true);
|
||||||
|
@ -19,6 +19,7 @@ const uint32 kConfigShow = 'show';
|
|||||||
const uint32 kConfigClose = 'canc';
|
const uint32 kConfigClose = 'canc';
|
||||||
const uint32 kUpdateRecentCounts = 'upct';
|
const uint32 kUpdateRecentCounts = 'upct';
|
||||||
const uint32 kEditMenuInTracker = 'mtrk';
|
const uint32 kEditMenuInTracker = 'mtrk';
|
||||||
|
const uint32 kStateChanged = 'stch';
|
||||||
|
|
||||||
|
|
||||||
class PreferencesWindow : public BWindow
|
class PreferencesWindow : public BWindow
|
||||||
|
Loading…
Reference in New Issue
Block a user