Codebase list lightdm-gtk-greeter-settings / b0168f1
~expander => ~spacer Andrew P. 9 years ago
4 changed file(s) with 9 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
284284 </packing>
285285 </child>
286286 <child>
287 <object class="GtkRadioButton" id="expander_choice">
287 <object class="GtkRadioButton" id="spacer_choice">
288288 <property name="visible">True</property>
289289 <property name="can_focus">True</property>
290290 <property name="receives_default">False</property>
297297 <property name="can_focus">False</property>
298298 <property name="halign">start</property>
299299 <property name="hexpand">True</property>
300 <property name="label" translatable="yes" context="indicators-dialog">Expander</property>
300 <property name="label" translatable="yes" context="indicators-dialog">Spacer</property>
301301 <attributes>
302302 <attribute name="weight" value="semibold"/>
303303 </attributes>
6363 'clock-format': (OptionEntry.ClockFormatEntry, 'clock_format',
6464 '%a, %H:%M'),
6565 'indicators': (OptionEntry.IndicatorsEntry, 'indicators',
66 '~host;~expander;~clock;~expander;~language;~session;~a11y;~power'),
66 '~host;~spacer;~clock;~spacer;~language;~session;~a11y;~power'),
6767 # Position
6868 'position': (OptionEntry.PositionEntry, 'position', '50%,center'),
6969 # Misc
3131
3232 BUILDER_WIDGETS = ('short_choice', 'short_value', 'short_model',
3333 'path_choice', 'path_value',
34 'expander_choice', 'separator_choice',
34 'spacer_choice', 'separator_choice',
3535 'add_button', 'ok_button', 'infobar', 'message')
3636
3737 def __new__(cls, check_callback=None, add_callback=None):
6868 return self._short_value.props.text
6969 elif self._path_choice.props.active:
7070 return self._path_value.get_filename()
71 elif self._expander_choice.props.active:
72 return '~expander';
71 elif self._spacer_choice.props.active:
72 return '~spacer';
7373 else:
7474 return '~separator';
7575
359359 class IndicatorsEntry(BaseEntry):
360360 ROW = ModelRowEnum('NAME', 'TOOLTIP', 'EDITABLE', 'HAS_STATE', 'STATE')
361361 NAMES_DELIMITER = ';'
362 DEFAULT_TOOLTIPS = {'~expander': C_('option-entry|indicators', 'Expander'),
362 DEFAULT_TOOLTIPS = {'~spacer': C_('option-entry|indicators', 'Expander'),
363363 '~separator': C_('option-entry|indicators', 'Separator')}
364364
365365 def __init__(self, widgets):
442442 ''' Returns True if name is valid, error message or False otherwise '''
443443 if not name:
444444 return False
445 elif name not in ('~expander', '~separator'):
445 elif name not in ('~spacer', '~separator'):
446446 if any(row[self.ROW.NAME] == name for row in self._model):
447447 return C_('option-entry|indicators',
448448 'Indicator "{indicator}" is already in the list')\
459459 tooltip = self.DEFAULT_TOOLTIPS.get(name,
460460 C_('option-entry|indicators', 'Indicator: {name}')
461461 .format(name=name))
462 editable = name not in ('~expander', '~separator')
462 editable = name not in ('~spacer', '~separator')
463463 return self.ROW(NAME=name, TOOLTIP=tooltip, EDITABLE=editable,
464464 HAS_STATE=False, STATE=False)
465465