mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[227056] Traditional Rendering Context Menu Column Options are poor
This commit is contained in:
parent
33b9380881
commit
d8f5b3b912
2 changed files with 25 additions and 14 deletions
|
@ -823,20 +823,20 @@ public class TraditionalRendering extends AbstractMemoryRendering implements IRe
|
|||
displayColumnCountAuto.setChecked(fRendering.getColumnsSetting() == Rendering.COLUMNS_AUTO_SIZE_TO_FIT);
|
||||
|
||||
final Action[] displayColumnCounts = new Action[MAX_MENU_COLUMN_COUNT];
|
||||
for(int i = 0; i < MAX_MENU_COLUMN_COUNT; i++)
|
||||
for(int i = 0, j = 1; i < MAX_MENU_COLUMN_COUNT; i++, j*=2)
|
||||
{
|
||||
final int finali = i;
|
||||
final int finali = j;
|
||||
displayColumnCounts[i] = new Action(
|
||||
TraditionalRenderingMessages
|
||||
.getString("TraditionalRendering.COLUMN_COUNT_" + (i + 1)), //$NON-NLS-1$
|
||||
.getString("TraditionalRendering.COLUMN_COUNT_" + finali), //$NON-NLS-1$
|
||||
IAction.AS_RADIO_BUTTON)
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
TraditionalRendering.this.fRendering.setColumnsSetting(finali + 1);
|
||||
TraditionalRendering.this.fRendering.setColumnsSetting(finali);
|
||||
}
|
||||
};
|
||||
displayColumnCounts[i].setChecked(fRendering.getColumnsSetting() == i + 1);
|
||||
displayColumnCounts[i].setChecked(fRendering.getColumnsSetting() == finali);
|
||||
}
|
||||
|
||||
final Action displayColumnCountCustomValue = new Action("", IAction.AS_RADIO_BUTTON)
|
||||
|
@ -845,7 +845,10 @@ public class TraditionalRendering extends AbstractMemoryRendering implements IRe
|
|||
{
|
||||
}
|
||||
};
|
||||
displayColumnCountCustomValue.setChecked(fRendering.getColumnsSetting() > 8);
|
||||
boolean currentCountIsCustom = true;
|
||||
for(int i = 0, j = 1; i < MAX_MENU_COLUMN_COUNT && currentCountIsCustom; i++, j*=2)
|
||||
currentCountIsCustom = (j != fRendering.getColumnsSetting());
|
||||
displayColumnCountCustomValue.setChecked(currentCountIsCustom);
|
||||
|
||||
|
||||
final Action displayColumnCountCustom = new Action(
|
||||
|
@ -883,11 +886,19 @@ public class TraditionalRendering extends AbstractMemoryRendering implements IRe
|
|||
int currentColumnSetting = TraditionalRendering.this.fRendering.getColumnsSetting();
|
||||
if(currentColumnSetting == Rendering.COLUMNS_AUTO_SIZE_TO_FIT)
|
||||
displayColumnCountAuto.setChecked(true);
|
||||
else if(currentColumnSetting > 0 && currentColumnSetting <= MAX_MENU_COLUMN_COUNT)
|
||||
displayColumnCounts[currentColumnSetting - 1].setChecked(true);
|
||||
else
|
||||
displayColumnCountCustomValue.setChecked(true);
|
||||
|
||||
{
|
||||
boolean currentCountIsCustom = true;
|
||||
for(int i = 0, j = 1; i < MAX_MENU_COLUMN_COUNT && currentCountIsCustom; i++, j*=2)
|
||||
{
|
||||
currentCountIsCustom = (j != fRendering.getColumnsSetting());
|
||||
if(j == fRendering.getColumnsSetting())
|
||||
displayColumnCounts[i].setChecked(true);
|
||||
}
|
||||
if(currentCountIsCustom)
|
||||
displayColumnCountCustomValue.setChecked(true);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,11 +39,11 @@ TraditionalRendering.COLUMN_COUNT=Columns
|
|||
TraditionalRendering.COLUMN_COUNT_AUTO=Auto Size to Fill
|
||||
TraditionalRendering.COLUMN_COUNT_1=1
|
||||
TraditionalRendering.COLUMN_COUNT_2=2
|
||||
TraditionalRendering.COLUMN_COUNT_3=3
|
||||
TraditionalRendering.COLUMN_COUNT_4=4
|
||||
TraditionalRendering.COLUMN_COUNT_5=5
|
||||
TraditionalRendering.COLUMN_COUNT_6=6
|
||||
TraditionalRendering.COLUMN_COUNT_7=7
|
||||
TraditionalRendering.COLUMN_COUNT_8=8
|
||||
TraditionalRendering.COLUMN_COUNT_16=16
|
||||
TraditionalRendering.COLUMN_COUNT_32=32
|
||||
TraditionalRendering.COLUMN_COUNT_64=64
|
||||
TraditionalRendering.COLUMN_COUNT_128=128
|
||||
TraditionalRendering.COLUMN_COUNT_CUSTOM=Custom...
|
||||
TraditionalRendering.COPY_ADDRESS=Copy Address
|
Loading…
Add table
Reference in a new issue