Changeset 6e52bd6bf321347c929997b1f443880fe943884d
- Timestamp:
- 02/25/09 00:34:31 (3 years ago)
- Author:
- Lincoln de Sousa <lincoln@…>
- Children:
- c95bf630f021b6586a8fe1f66cb52041c3015b53
- Parents:
- c4a0f94bc911001699419c287b7c238f89fcec64
- git-committer:
- Lincoln de Sousa <lincoln@…> (02/25/09 00:34:31)
- Message:
-
Making the quit shortcut configurable
Another change was that the default value to the quit
feature was changed to "Ctrl+Shift+Q" to make it harder
to clash with keybinding of other app. (Closes: #92)
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r1f4c866
|
r6e52bd6
|
|
| 264 | 264 | <long>Global keybinding to allow user call guake from each |
| 265 | 265 | place after it's opened without clicks.</long> |
| | 266 | </locale> |
| | 267 | </schema> |
| | 268 | |
| | 269 | <schema> |
| | 270 | <key>/schemas/apps/guake/keybindings/local/quit</key> |
| | 271 | <applyto>/apps/guake/keybindings/local/quit</applyto> |
| | 272 | <owner>guake</owner> |
| | 273 | <type>string</type> |
| | 274 | <default><Control><Shift>q</default> |
| | 275 | <locale name="C"> |
| | 276 | <short>Quit</short> |
| | 277 | <long>Quit Guake.</long> |
| 266 | 278 | </locale> |
| 267 | 279 | </schema> |
-
|
rd0e6e53
|
r6e52bd6
|
|
| 304 | 304 | keys = ['toggle_fullscreen', 'new_tab', 'close_tab', 'rename_tab', |
| 305 | 305 | 'previous_tab', 'next_tab', 'clipboard_copy', 'clipboard_paste', |
| | 306 | 'quit', |
| 306 | 307 | ] |
| 307 | 308 | for key in keys: |
| … |
… |
|
| 337 | 338 | """ |
| 338 | 339 | gets = lambda x:self.client.get_string(LKEY(x)) |
| | 340 | key, mask = gtk.accelerator_parse(gets('quit')) |
| | 341 | if key > 0: |
| | 342 | gtk.accel_map_change_entry('<Guake>/Quit', key, mask, True) |
| | 343 | ctxbtn = self.guake.get_widget('context_close') |
| | 344 | ctxbtn.set_accel_path('<Guake>/Quit') |
| | 345 | |
| 339 | 346 | key, mask = gtk.accelerator_parse(gets('new_tab')) |
| 340 | 347 | if key > 0: |
| … |
… |
|
| 554 | 561 | self.hotkeys = globalhotkeys.GlobalHotkey() |
| 555 | 562 | self.load_config() |
| 556 | | self.load_accel_map() |
| 557 | 563 | |
| 558 | 564 | key = self.client.get_string(GKEY('show_hide')) |
| … |
… |
|
| 751 | 757 | self.client.notify(KEY('/general/use_default_font')) |
| 752 | 758 | |
| 753 | | def load_accel_map(self): |
| 754 | | """Sets the accel map of quit context option. |
| 755 | | """ |
| 756 | | key, mask = gtk.accelerator_parse('<Control>q') |
| 757 | | gtk.accel_map_add_entry('<Guake>/Quit', key, mask) |
| 758 | | btn = self.get_widget('context_close') |
| 759 | | btn.set_accel_path('<Guake>/Quit') |
| 760 | | |
| 761 | 759 | def accel_add(self, *args): |
| 762 | 760 | """Callback to add a new tab. Called by the accel key. |
-
|
rdb4ceb3
|
r6e52bd6
|
|
| 55 | 55 | {'key': LKEY('toggle_fullscreen'), |
| 56 | 56 | 'label': _('Toggle Fullscreen')}, |
| | 57 | {'key': LKEY('quit'), |
| | 58 | 'label': _('Quit')}, |
| 57 | 59 | ]}, |
| 58 | 60 | |