Changeset 12326de82f59f708023edba4e431e5d50283c683
- Timestamp:
- 12/17/08 20:24:11 (3 years ago)
- Author:
- Lincoln de Sousa <lincoln@…>
- Children:
- a7c6ed1fcaf5e18d34df047df048dee74b9cc532
- Parents:
- 7b54f1e9f0b6bd7ef9bb2c833107eaa887fb4896
- git-committer:
- Lincoln de Sousa <lincoln@…> (12/17/08 20:24:11)
- Message:
-
Adding a keyboard shortcut to rename a tab.
Its default key is F2 because many of softwares (like
nautilus) uses the same key to the same feature. (Closes #60)
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
rbfa2a8e
|
r12326de
|
|
| 258 | 258 | <short>Next tab.</short> |
| 259 | 259 | <long>Shows the next tab.</long> |
| | 260 | </locale> |
| | 261 | </schema> |
| | 262 | |
| | 263 | <schema> |
| | 264 | <key>/schemas/apps/guake/keybindings/local/rename_tab</key> |
| | 265 | <applyto>/apps/guake/keybindings/local/rename_tab</applyto> |
| | 266 | <owner>guake</owner> |
| | 267 | <type>string</type> |
| | 268 | <default>F2</default> |
| | 269 | <locale name="C"> |
| | 270 | <short>Rename tab.</short> |
| | 271 | <long>Shows a dialog to rename the current tab.</long> |
| 260 | 272 | </locale> |
| 261 | 273 | </schema> |
-
|
r7b54f1e
|
r12326de
|
|
| 379 | 379 | self.accel_next) |
| 380 | 380 | |
| | 381 | ac = gets(GCONF_PATH+'keybindings/local/rename_tab') |
| | 382 | key, mask = gtk.accelerator_parse(ac) |
| | 383 | if key > 0: |
| | 384 | self.accel_group.connect_group(key, mask, gtk.ACCEL_VISIBLE, |
| | 385 | self.accel_rename) |
| | 386 | |
| 381 | 387 | ac = gets(GCONF_PATH+'keybindings/local/clipboard_copy') |
| 382 | 388 | key, mask = gtk.accelerator_parse(ac) |
| … |
… |
|
| 420 | 426 | self.notebook.next_page() |
| 421 | 427 | return True |
| | 428 | |
| | 429 | def accel_rename(self, *args): |
| | 430 | """Callback to show the rename tab dialog. Called by the accel |
| | 431 | key. |
| | 432 | """ |
| | 433 | pagepos = self.notebook.get_current_page() |
| | 434 | self.selected_tab = self.tabs.get_children()[pagepos] |
| | 435 | self.on_rename_activate() |
| 422 | 436 | |
| 423 | 437 | def accel_copy_clipboard(self, *args): |
-
|
rbfa2a8e
|
r12326de
|
|
| 51 | 51 | (GCONF_KEYS+'local/previous_tab', _('Go to previous tab')), |
| 52 | 52 | (GCONF_KEYS+'local/next_tab', _('Go to next tab'),), |
| | 53 | (GCONF_KEYS+'local/rename_tab', _('Rename current tab'),), |
| 53 | 54 | (GCONF_KEYS+'local/clipboard_copy', _('Copy text to clipboard'),), |
| 54 | 55 | (GCONF_KEYS+'local/clipboard_paste', _('Paste text from clipboard'),), |