@@ -3616,7 +3616,10 @@ void CCustomMenuDlg7::SerializeData( void )
3616
3616
stringBuilder.push_back (0 );
3617
3617
CSettingsLockWrite lock;
3618
3618
m_pSetting->value =CComVariant (&stringBuilder[0 ]);
3619
- m_pSetting->flags &=~CSetting::FLAG_DEFAULT;
3619
+ if (m_pSetting->value ==m_pSetting->defValue )
3620
+ m_pSetting->flags |=CSetting::FLAG_DEFAULT;
3621
+ else
3622
+ m_pSetting->flags &=~CSetting::FLAG_DEFAULT;
3620
3623
SetSettingsDirty ();
3621
3624
}
3622
3625
@@ -3843,7 +3846,10 @@ LRESULT CMenuStyleDlg::OnClick( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&
3843
3846
CheckDlgButton (IDC_RADIO_CLASSIC,pSetting->value .intVal ==MENU_CLASSIC1?BST_CHECKED:BST_UNCHECKED);
3844
3847
CheckDlgButton (IDC_RADIO_TWO_COLUMNS,pSetting->value .intVal ==MENU_CLASSIC2?BST_CHECKED:BST_UNCHECKED);
3845
3848
CheckDlgButton (IDC_RADIO_WIN7,pSetting->value .intVal ==MENU_WIN7?BST_CHECKED:BST_UNCHECKED);
3846
- pSetting->flags &=~CSetting::FLAG_DEFAULT;
3849
+ if (pSetting->value ==pSetting->defValue )
3850
+ pSetting->flags |=CSetting::FLAG_DEFAULT;
3851
+ else
3852
+ pSetting->flags &=~CSetting::FLAG_DEFAULT;
3847
3853
SetSettingsDirty ();
3848
3854
3849
3855
SetSettingsStyle (styleFlag,CSetting::FLAG_MENU_MASK);
@@ -3861,7 +3867,10 @@ LRESULT CMenuStyleDlg::OnEnabled( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL
3861
3867
CSettingsLockWrite lock;
3862
3868
CSetting *pSetting=FindSetting (L" EnableStartButton" );
3863
3869
pSetting->value =CComVariant (bEnabled);
3864
- pSetting->flags &=~CSetting::FLAG_DEFAULT;
3870
+ if (pSetting->value ==pSetting->defValue )
3871
+ pSetting->flags |=CSetting::FLAG_DEFAULT;
3872
+ else
3873
+ pSetting->flags &=~CSetting::FLAG_DEFAULT;
3865
3874
SetSettingsDirty ();
3866
3875
}
3867
3876
Update (false );
@@ -3900,7 +3909,10 @@ LRESULT CMenuStyleDlg::OnButtonStyle( WORD wNotifyCode, WORD wID, HWND hWndCtl,
3900
3909
CSettingsLockWrite lock;
3901
3910
CSetting *pSetting=FindSetting (L" StartButtonType" );
3902
3911
pSetting->value =CComVariant (style);
3903
- pSetting->flags &=~CSetting::FLAG_DEFAULT;
3912
+ if (pSetting->value ==pSetting->defValue )
3913
+ pSetting->flags |=CSetting::FLAG_DEFAULT;
3914
+ else
3915
+ pSetting->flags &=~CSetting::FLAG_DEFAULT;
3904
3916
SetSettingsDirty ();
3905
3917
}
3906
3918
Update (false );
@@ -3924,7 +3936,10 @@ LRESULT CMenuStyleDlg::OnPick( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& b
3924
3936
CSettingsLockWrite lock;
3925
3937
CSetting *pSetting=FindSetting (L" StartButtonPath" );
3926
3938
pSetting->value =CComVariant (path);
3927
- pSetting->flags &=~CSetting::FLAG_DEFAULT;
3939
+ if (pSetting->value ==pSetting->defValue )
3940
+ pSetting->flags |=CSetting::FLAG_DEFAULT;
3941
+ else
3942
+ pSetting->flags &=~CSetting::FLAG_DEFAULT;
3928
3943
SetSettingsDirty ();
3929
3944
}
3930
3945
Update (true );
@@ -4545,15 +4560,21 @@ void UpgradeSettings( bool bShared )
4545
4560
items.Replace (L" Command=recent_items\n " ,L" Command=recent_programs\n " );
4546
4561
items.Replace (L" Command=control_panel_categories\n " ,L" Command=control_panel\n " );
4547
4562
pSettingItems->value =items;
4548
- pSettingItems->flags &=~CSetting::FLAG_DEFAULT;
4563
+ if (pSettingItems->value ==pSettingItems->defValue )
4564
+ pSettingItems->flags |=CSetting::FLAG_DEFAULT;
4565
+ else
4566
+ pSettingItems->flags &=~CSetting::FLAG_DEFAULT;
4549
4567
}
4550
4568
4551
4569
// set initial menu style
4552
4570
CSetting *pSettingStyle=FindSetting (L" MenuStyle" );
4553
4571
if (!pSettingStyle->IsLocked ())
4554
4572
{
4555
4573
pSettingStyle->value =(bTwoColumns?1 :0 );
4556
- pSettingStyle->flags &=~CSetting::FLAG_DEFAULT;
4574
+ if (pSettingStyle->value ==pSettingStyle->defValue )
4575
+ pSettingStyle->flags |=CSetting::FLAG_DEFAULT;
4576
+ else
4577
+ pSettingStyle->flags &=~CSetting::FLAG_DEFAULT;
4557
4578
SetSettingsStyle (bTwoColumns?CSetting::FLAG_MENU_CLASSIC2:CSetting::FLAG_MENU_CLASSIC1,CSetting::FLAG_MENU_MASK);
4558
4579
}
4559
4580
@@ -4565,7 +4586,10 @@ void UpgradeSettings( bool bShared )
4565
4586
if (!pSetting->IsDefault ())
4566
4587
{
4567
4588
pSettingSkin->value =pSetting->value ;
4568
- pSettingSkin->flags &=~CSetting::FLAG_DEFAULT;
4589
+ if (pSettingSkin->value ==pSettingSkin->defValue )
4590
+ pSettingSkin->flags |=CSetting::FLAG_DEFAULT;
4591
+ else
4592
+ pSettingSkin->flags &=~CSetting::FLAG_DEFAULT;
4569
4593
}
4570
4594
}
4571
4595
CSetting *pSettingOpt=FindSetting (bTwoColumns?L" SkinOptionsC2" :L" SkinOptionsC1" );
@@ -4575,7 +4599,10 @@ void UpgradeSettings( bool bShared )
4575
4599
if (!pSetting->IsDefault ())
4576
4600
{
4577
4601
pSettingOpt->value =pSetting->value ;
4578
- pSettingOpt->flags &=~CSetting::FLAG_DEFAULT;
4602
+ if (pSettingOpt->value ==pSettingOpt->defValue )
4603
+ pSettingOpt->flags |=CSetting::FLAG_DEFAULT;
4604
+ else
4605
+ pSettingOpt->flags &=~CSetting::FLAG_DEFAULT;
4579
4606
}
4580
4607
}
4581
4608
CSetting *pSettingVar=FindSetting (bTwoColumns?L" SkinVariationC2" :L" SkinVariationC1" );
@@ -4585,7 +4612,10 @@ void UpgradeSettings( bool bShared )
4585
4612
if (!pSetting->IsDefault ())
4586
4613
{
4587
4614
pSettingVar->value =pSetting->value ;
4588
- pSettingVar->flags &=~CSetting::FLAG_DEFAULT;
4615
+ if (pSettingVar->value ==pSettingVar->defValue )
4616
+ pSettingVar->flags |=CSetting::FLAG_DEFAULT;
4617
+ else
4618
+ pSettingVar->flags &=~CSetting::FLAG_DEFAULT;
4589
4619
}
4590
4620
}
4591
4621
@@ -4597,7 +4627,10 @@ void UpgradeSettings( bool bShared )
4597
4627
if (!pSetting->IsDefault ())
4598
4628
{
4599
4629
pSettingSkin->value =pSetting->value ;
4600
- pSettingSkin->flags &=~CSetting::FLAG_DEFAULT;
4630
+ if (pSettingSkin->value ==pSettingSkin->defValue )
4631
+ pSettingSkin->flags |=CSetting::FLAG_DEFAULT;
4632
+ else
4633
+ pSettingSkin->flags &=~CSetting::FLAG_DEFAULT;
4601
4634
}
4602
4635
}
4603
4636
pSettingOpt=FindSetting (L" SkinOptionsA" );
@@ -4607,7 +4640,10 @@ void UpgradeSettings( bool bShared )
4607
4640
if (!pSetting->IsDefault ())
4608
4641
{
4609
4642
pSettingOpt->value =pSetting->value ;
4610
- pSettingOpt->flags &=~CSetting::FLAG_DEFAULT;
4643
+ if (pSettingOpt->value ==pSettingOpt->defValue )
4644
+ pSettingOpt->flags |=CSetting::FLAG_DEFAULT;
4645
+ else
4646
+ pSettingOpt->flags &=~CSetting::FLAG_DEFAULT;
4611
4647
}
4612
4648
}
4613
4649
pSettingVar=FindSetting (L" SkinVariationA" );
@@ -4617,7 +4653,10 @@ void UpgradeSettings( bool bShared )
4617
4653
if (!pSetting->IsDefault ())
4618
4654
{
4619
4655
pSettingVar->value =pSetting->value ;
4620
- pSettingVar->flags &=~CSetting::FLAG_DEFAULT;
4656
+ if (pSettingVar->value ==pSettingVar->defValue )
4657
+ pSettingVar->flags |=CSetting::FLAG_DEFAULT;
4658
+ else
4659
+ pSettingVar->flags &=~CSetting::FLAG_DEFAULT;
4621
4660
}
4622
4661
}
4623
4662
}
0 commit comments