#1208 closed enhancement (fixed)
Accelerators for zoom toolbar
Reported by: | erikos | Owned by: | tomeu |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | |
Component: | Sugar | Version: | 0.85.x |
Severity: | Unspecified | Keywords: | r? |
Cc: | Distribution/OS: | Unspecified | |
Bug Status: | New |
Description
diff --git a/src/jarabe/frame/zoomtoolbar.py b/src/jarabe/frame/zoomtoolbar.py index 43cc358..030e41e 100644 --- a/src/jarabe/frame/zoomtoolbar.py +++ b/src/jarabe/frame/zoomtoolbar.py @@ -33,25 +33,26 @@ class ZoomToolbar(gtk.Toolbar): self.set_direction(gtk.TEXT_DIR_LTR) self._mesh_button = self._add_button('zoom-neighborhood', - _('Neighborhood'), shell.ShellModel.ZOOM_MESH) + _('Neighborhood'), 'F1', shell.ShellModel.ZOOM_MESH) self._groups_button = self._add_button('zoom-groups', - _('Group'), shell.ShellModel.ZOOM_GROUP) + _('Group'), 'F2', shell.ShellModel.ZOOM_GROUP) self._home_button = self._add_button('zoom-home', - _('Home'), shell.ShellModel.ZOOM_HOME) + _('Home'), 'F3', shell.ShellModel.ZOOM_HOME) self._activity_button = self._add_button('zoom-activity', - _('Activity'), shell.ShellModel.ZOOM_ACTIVITY) + _('Activity'), 'F4', shell.ShellModel.ZOOM_ACTIVITY) shell_model = shell.get_model() self._set_zoom_level(shell_model.zoom_level) shell_model.zoom_level_changed.connect(self.__zoom_level_changed_cb) - def _add_button(self, icon_name, label, zoom_level): + def _add_button(self, icon_name, label, accelerator, zoom_level): if self.get_children(): group = self.get_children()[0] else: group = None - button = RadioToolButton(named_icon=icon_name, group=group) + button = RadioToolButton(named_icon=icon_name, group=group, + accelerator=accelerator) button.connect('clicked', self.__level_clicked_cb, zoom_level) self.add(button)
Change History (3)
comment:1 Changed 14 years ago by erikos
comment:2 Changed 14 years ago by erikos
- Resolution set to fixed
- Status changed from new to closed
Pushed.
Note: See
TracTickets for help on using
tickets.
Of course we should translate the accelerators _('F1').