@@ -3624,10 +3624,7 @@ void CCustomMenuDlg7::SerializeData( void )
3624
3624
stringBuilder.push_back (0 );
3625
3625
CSettingsLockWrite lock;
3626
3626
m_pSetting->value =CComVariant (&stringBuilder[0 ]);
3627
- if (m_pSetting->value ==m_pSetting->defValue )
3628
- m_pSetting->flags |=CSetting::FLAG_DEFAULT;
3629
- else
3630
- m_pSetting->flags &=~CSetting::FLAG_DEFAULT;
3627
+ m_pSetting->flags &=~CSetting::FLAG_DEFAULT;
3631
3628
SetSettingsDirty ();
3632
3629
}
3633
3630
@@ -3854,10 +3851,7 @@ LRESULT CMenuStyleDlg::OnClick( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&
3854
3851
CheckDlgButton (IDC_RADIO_CLASSIC,pSetting->value .intVal ==MENU_CLASSIC1?BST_CHECKED:BST_UNCHECKED);
3855
3852
CheckDlgButton (IDC_RADIO_TWO_COLUMNS,pSetting->value .intVal ==MENU_CLASSIC2?BST_CHECKED:BST_UNCHECKED);
3856
3853
CheckDlgButton (IDC_RADIO_WIN7,pSetting->value .intVal ==MENU_WIN7?BST_CHECKED:BST_UNCHECKED);
3857
- if (pSetting->value ==pSetting->defValue )
3858
- pSetting->flags |=CSetting::FLAG_DEFAULT;
3859
- else
3860
- pSetting->flags &=~CSetting::FLAG_DEFAULT;
3854
+ pSetting->flags &=~CSetting::FLAG_DEFAULT;
3861
3855
SetSettingsDirty ();
3862
3856
3863
3857
SetSettingsStyle (styleFlag,CSetting::FLAG_MENU_MASK);
@@ -3875,10 +3869,7 @@ LRESULT CMenuStyleDlg::OnEnabled( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL
3875
3869
CSettingsLockWrite lock;
3876
3870
CSetting *pSetting=FindSetting (L" EnableStartButton" );
3877
3871
pSetting->value =CComVariant (bEnabled);
3878
- if (pSetting->value ==pSetting->defValue )
3879
- pSetting->flags |=CSetting::FLAG_DEFAULT;
3880
- else
3881
- pSetting->flags &=~CSetting::FLAG_DEFAULT;
3872
+ pSetting->flags &=~CSetting::FLAG_DEFAULT;
3882
3873
SetSettingsDirty ();
3883
3874
}
3884
3875
Update (false );
@@ -3917,10 +3908,7 @@ LRESULT CMenuStyleDlg::OnButtonStyle( WORD wNotifyCode, WORD wID, HWND hWndCtl,
3917
3908
CSettingsLockWrite lock;
3918
3909
CSetting *pSetting=FindSetting (L" StartButtonType" );
3919
3910
pSetting->value =CComVariant (style);
3920
- if (pSetting->value ==pSetting->defValue )
3921
- pSetting->flags |=CSetting::FLAG_DEFAULT;
3922
- else
3923
- pSetting->flags &=~CSetting::FLAG_DEFAULT;
3911
+ pSetting->flags &=~CSetting::FLAG_DEFAULT;
3924
3912
SetSettingsDirty ();
3925
3913
}
3926
3914
Update (false );
@@ -3944,10 +3932,7 @@ LRESULT CMenuStyleDlg::OnPick( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& b
3944
3932
CSettingsLockWrite lock;
3945
3933
CSetting *pSetting=FindSetting (L" StartButtonPath" );
3946
3934
pSetting->value =CComVariant (path);
3947
- if (pSetting->value ==pSetting->defValue )
3948
- pSetting->flags |=CSetting::FLAG_DEFAULT;
3949
- else
3950
- pSetting->flags &=~CSetting::FLAG_DEFAULT;
3935
+ pSetting->flags &=~CSetting::FLAG_DEFAULT;
3951
3936
SetSettingsDirty ();
3952
3937
}
3953
3938
Update (true );
@@ -4586,21 +4571,15 @@ void UpgradeSettings( bool bShared )
4586
4571
items.Replace (L" Command=recent_items\n " ,L" Command=recent_programs\n " );
4587
4572
items.Replace (L" Command=control_panel_categories\n " ,L" Command=control_panel\n " );
4588
4573
pSettingItems->value =items;
4589
- if (pSettingItems->value ==pSettingItems->defValue )
4590
- pSettingItems->flags |=CSetting::FLAG_DEFAULT;
4591
- else
4592
- pSettingItems->flags &=~CSetting::FLAG_DEFAULT;
4574
+ pSettingItems->flags &=~CSetting::FLAG_DEFAULT;
4593
4575
}
4594
4576
4595
4577
// set initial menu style
4596
4578
CSetting *pSettingStyle=FindSetting (L" MenuStyle" );
4597
4579
if (!pSettingStyle->IsLocked ())
4598
4580
{
4599
4581
pSettingStyle->value =(bTwoColumns?1 :0 );
4600
- if (pSettingStyle->value ==pSettingStyle->defValue )
4601
- pSettingStyle->flags |=CSetting::FLAG_DEFAULT;
4602
- else
4603
- pSettingStyle->flags &=~CSetting::FLAG_DEFAULT;
4582
+ pSettingStyle->flags &=~CSetting::FLAG_DEFAULT;
4604
4583
SetSettingsStyle (bTwoColumns?CSetting::FLAG_MENU_CLASSIC2:CSetting::FLAG_MENU_CLASSIC1,CSetting::FLAG_MENU_MASK);
4605
4584
}
4606
4585
@@ -4612,10 +4591,7 @@ void UpgradeSettings( bool bShared )
4612
4591
if (!pSetting->IsDefault ())
4613
4592
{
4614
4593
pSettingSkin->value =pSetting->value ;
4615
- if (pSettingSkin->value ==pSettingSkin->defValue )
4616
- pSettingSkin->flags |=CSetting::FLAG_DEFAULT;
4617
- else
4618
- pSettingSkin->flags &=~CSetting::FLAG_DEFAULT;
4594
+ pSettingSkin->flags &=~CSetting::FLAG_DEFAULT;
4619
4595
}
4620
4596
}
4621
4597
CSetting *pSettingOpt=FindSetting (bTwoColumns?L" SkinOptionsC2" :L" SkinOptionsC1" );
@@ -4625,10 +4601,7 @@ void UpgradeSettings( bool bShared )
4625
4601
if (!pSetting->IsDefault ())
4626
4602
{
4627
4603
pSettingOpt->value =pSetting->value ;
4628
- if (pSettingOpt->value ==pSettingOpt->defValue )
4629
- pSettingOpt->flags |=CSetting::FLAG_DEFAULT;
4630
- else
4631
- pSettingOpt->flags &=~CSetting::FLAG_DEFAULT;
4604
+ pSettingOpt->flags &=~CSetting::FLAG_DEFAULT;
4632
4605
}
4633
4606
}
4634
4607
CSetting *pSettingVar=FindSetting (bTwoColumns?L" SkinVariationC2" :L" SkinVariationC1" );
@@ -4638,10 +4611,7 @@ void UpgradeSettings( bool bShared )
4638
4611
if (!pSetting->IsDefault ())
4639
4612
{
4640
4613
pSettingVar->value =pSetting->value ;
4641
- if (pSettingVar->value ==pSettingVar->defValue )
4642
- pSettingVar->flags |=CSetting::FLAG_DEFAULT;
4643
- else
4644
- pSettingVar->flags &=~CSetting::FLAG_DEFAULT;
4614
+ pSettingVar->flags &=~CSetting::FLAG_DEFAULT;
4645
4615
}
4646
4616
}
4647
4617
@@ -4653,10 +4623,7 @@ void UpgradeSettings( bool bShared )
4653
4623
if (!pSetting->IsDefault ())
4654
4624
{
4655
4625
pSettingSkin->value =pSetting->value ;
4656
- if (pSettingSkin->value ==pSettingSkin->defValue )
4657
- pSettingSkin->flags |=CSetting::FLAG_DEFAULT;
4658
- else
4659
- pSettingSkin->flags &=~CSetting::FLAG_DEFAULT;
4626
+ pSettingSkin->flags &=~CSetting::FLAG_DEFAULT;
4660
4627
}
4661
4628
}
4662
4629
pSettingOpt=FindSetting (L" SkinOptionsA" );
@@ -4666,10 +4633,7 @@ void UpgradeSettings( bool bShared )
4666
4633
if (!pSetting->IsDefault ())
4667
4634
{
4668
4635
pSettingOpt->value =pSetting->value ;
4669
- if (pSettingOpt->value ==pSettingOpt->defValue )
4670
- pSettingOpt->flags |=CSetting::FLAG_DEFAULT;
4671
- else
4672
- pSettingOpt->flags &=~CSetting::FLAG_DEFAULT;
4636
+ pSettingOpt->flags &=~CSetting::FLAG_DEFAULT;
4673
4637
}
4674
4638
}
4675
4639
pSettingVar=FindSetting (L" SkinVariationA" );
@@ -4679,10 +4643,7 @@ void UpgradeSettings( bool bShared )
4679
4643
if (!pSetting->IsDefault ())
4680
4644
{
4681
4645
pSettingVar->value =pSetting->value ;
4682
- if (pSettingVar->value ==pSettingVar->defValue )
4683
- pSettingVar->flags |=CSetting::FLAG_DEFAULT;
4684
- else
4685
- pSettingVar->flags &=~CSetting::FLAG_DEFAULT;
4646
+ pSettingVar->flags &=~CSetting::FLAG_DEFAULT;
4686
4647
}
4687
4648
}
4688
4649
}
0 commit comments