#789 closed enhancement (fixed)
Use toolbar accelerators in Write
Reported by: | garycmartin | Owned by: | godiard |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | |
Component: | Write | Version: | Unspecified |
Severity: | Unspecified | Keywords: | easy-hack |
Cc: | alsroot, humitos | Distribution/OS: | Unspecified |
Bug Status: | Unconfirmed |
Description
Write uses keyboard shortcuts set by an abiword plugin via an xml file (keybindings.xml). It would be good to migrate relevant shortcuts over to toolbar accelerators, so that they are self documenting within the user interface.
Change History (10)
comment:1 Changed 14 years ago by garycmartin
- Cc alsroot added
- Milestone changed from Unspecified by Release Team to 0.86
- Owner set to garycmartin
- Status changed from new to assigned
comment:2 Changed 14 years ago by tomeu
- Milestone changed from 0.86 to 0.88
Looks like this will miss 0.88 :(
comment:4 Changed 11 years ago by godiard
- Keywords easy-hack added
comment:5 Changed 11 years ago by humitos
- Cc humitos added
comment:6 Changed 11 years ago by humitos
I didn't find the way to do this because gtk.ToggleToolButton doesn't have the property props.accelerator to define the accelerator properly.
I was trying to add accelerator to Bold button and this happened in my process... :(
comment:7 follow-up: ↓ 8 Changed 11 years ago by godiard
- Owner changed from garycmartin to godiard
It's true :(
ToolButton in toolbutton.py implement set_accelerator but ToggleToolButton inherit fromn gtk.ToggleToolButton and not implement it.
I don't know if this is by design or not. Can you send a mail to sugar-devel asking if should be implemented in gtk.ToggleToolButton or in another way?
Another alternative is use the signal 'key-press-event' in the activity and change the button state there. (You can see a example in Read activity)
comment:8 in reply to: ↑ 7 Changed 11 years ago by humitos
Replying to godiard:
Another alternative is use the signal 'key-press-event' in the activity and change the button state there. (You can see a example in Read activity)
The hotkeys are working properly. You can press Ctrl+U and get the text underlined, but the hotkey is not shown in the button description tooltip.
comment:9 Changed 11 years ago by godiard
- Milestone changed from 0.90 to 0.98
- Resolution set to fixed
- Status changed from assigned to closed
As this was fixed in sugar-toolkit-gtk3 [1] we only need set the property.
[1] 428d648fe3e8dea574e0b9df03337f220eb6d84a
I'll try to give this a shot for this cycle.