Ticket #233: patch_key_accel_tabs.diff
| File patch_key_accel_tabs.diff, 8.0 KB (added by TiN, 23 months ago) |
|---|
-
data/guake.schemas
diff --git a/data/guake.schemas b/data/guake.schemas index 3d26c6d..e055ce6 100644
a b 379 379 </schema> 380 380 381 381 <schema> 382 <key>/schemas/apps/guake/keybindings/local/tab_0</key> 383 <applyto>/apps/guake/keybindings/local/tab_0</applyto> 384 <owner>guake</owner> 385 <type>string</type> 386 <default><Alt>0</default> 387 <locale name="C"> 388 <short>Tab 0.</short> 389 <long>Shows the tab 0.</long> 390 </locale> 391 </schema> 392 393 <schema> 394 <key>/schemas/apps/guake/keybindings/local/tab_1</key> 395 <applyto>/apps/guake/keybindings/local/tab_1</applyto> 396 <owner>guake</owner> 397 <type>string</type> 398 <default><Alt>1</default> 399 <locale name="C"> 400 <short>Tab 1.</short> 401 <long>Shows the tab 1.</long> 402 </locale> 403 </schema> 404 405 <schema> 406 <key>/schemas/apps/guake/keybindings/local/tab_2</key> 407 <applyto>/apps/guake/keybindings/local/tab_2</applyto> 408 <owner>guake</owner> 409 <type>string</type> 410 <default><Alt>2</default> 411 <locale name="C"> 412 <short>Tab 2.</short> 413 <long>Shows the tab 2.</long> 414 </locale> 415 </schema> 416 417 <schema> 418 <key>/schemas/apps/guake/keybindings/local/tab_3</key> 419 <applyto>/apps/guake/keybindings/local/tab_3</applyto> 420 <owner>guake</owner> 421 <type>string</type> 422 <default><Alt>3</default> 423 <locale name="C"> 424 <short>Tab 3.</short> 425 <long>Shows the tab 3.</long> 426 </locale> 427 </schema> 428 429 <schema> 430 <key>/schemas/apps/guake/keybindings/local/tab_4</key> 431 <applyto>/apps/guake/keybindings/local/tab_4</applyto> 432 <owner>guake</owner> 433 <type>string</type> 434 <default><Alt>4</default> 435 <locale name="C"> 436 <short>Tab 4.</short> 437 <long>Shows the tab 4.</long> 438 </locale> 439 </schema> 440 441 <schema> 442 <key>/schemas/apps/guake/keybindings/local/tab_5</key> 443 <applyto>/apps/guake/keybindings/local/tab_5</applyto> 444 <owner>guake</owner> 445 <type>string</type> 446 <default><Alt>5</default> 447 <locale name="C"> 448 <short>Tab 5.</short> 449 <long>Shows the tab 5.</long> 450 </locale> 451 </schema> 452 453 <schema> 454 <key>/schemas/apps/guake/keybindings/local/tab_6</key> 455 <applyto>/apps/guake/keybindings/local/tab_6</applyto> 456 <owner>guake</owner> 457 <type>string</type> 458 <default><Alt>6</default> 459 <locale name="C"> 460 <short>Tab 6.</short> 461 <long>Shows the tab 6.</long> 462 </locale> 463 </schema> 464 465 <schema> 466 <key>/schemas/apps/guake/keybindings/local/tab_7</key> 467 <applyto>/apps/guake/keybindings/local/tab_7</applyto> 468 <owner>guake</owner> 469 <type>string</type> 470 <default><Alt>7</default> 471 <locale name="C"> 472 <short>Tab 7.</short> 473 <long>Shows the tab 7.</long> 474 </locale> 475 </schema> 476 477 <schema> 478 <key>/schemas/apps/guake/keybindings/local/tab_8</key> 479 <applyto>/apps/guake/keybindings/local/tab_8</applyto> 480 <owner>guake</owner> 481 <type>string</type> 482 <default><Alt>8</default> 483 <locale name="C"> 484 <short>Tab 8.</short> 485 <long>Shows the tab 8.</long> 486 </locale> 487 </schema> 488 489 <schema> 490 <key>/schemas/apps/guake/keybindings/local/tab_9</key> 491 <applyto>/apps/guake/keybindings/local/tab_9</applyto> 492 <owner>guake</owner> 493 <type>string</type> 494 <default><Alt>9</default> 495 <locale name="C"> 496 <short>Tab 9.</short> 497 <long>Shows the tab 9.</long> 498 </locale> 499 </schema> 500 501 <schema> 382 502 <key>/schemas/apps/guake/keybindings/local/rename_tab</key> 383 503 <applyto>/apps/guake/keybindings/local/rename_tab</applyto> 384 504 <owner>guake</owner> -
m4/intltool.m4
diff --git a/m4/intltool.m4 b/m4/intltool.m4 index 122d773..839e855 100644
a b 172 172 AC_DEFUN([IT_PO_SUBDIR], 173 173 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. 174 174 dnl 175 dnl The following CONFIG_COMMANDS should be exe tuted at the very end175 dnl The following CONFIG_COMMANDS should be executed at the very end 176 176 dnl of config.status. 177 177 AC_CONFIG_COMMANDS_PRE([ 178 178 AC_CONFIG_COMMANDS([$1/stamp-it], [ -
src/guake.py
diff --git a/src/guake.py b/src/guake.py index 6214fb2..22e3ca8 100644
a b 342 342 to be used in internal methods. 343 343 """ 344 344 self.guake = guake 345 self.guake.key_tab = {} 345 346 self.accel_group = None # see reload_accelerators 346 347 self.client = gconf.client_get_default() 347 348 … … 352 353 'previous_tab', 'next_tab', 'clipboard_copy', 'clipboard_paste', 353 354 'quit', 354 355 ] 356 keys += ["tab_%s" % i for i in xrange(10)] 355 357 for key in keys: 356 358 notify_add(LKEY(key), self.reload_accelerators) 357 359 self.client.notify(LKEY(key)) … … 410 412 self.accel_group.connect_group(key, mask, gtk.ACCEL_VISIBLE, 411 413 self.guake.accel_next) 412 414 415 for i in xrange(10): 416 key, mask = gtk.accelerator_parse(gets('tab_%s' % i)) 417 if key > 0: 418 self.guake.key_tab[key] = i 419 self.accel_group.connect_group(key, mask, gtk.ACCEL_VISIBLE, 420 self.guake.accel_tab) 421 413 422 key, mask = gtk.accelerator_parse(gets('rename_tab')) 414 423 if key > 0: 415 424 self.accel_group.connect_group(key, mask, gtk.ACCEL_VISIBLE, … … 913 922 self.notebook.next_page() 914 923 return True 915 924 925 def accel_tab(self, *args): 926 """Callback to go to the N tab. Called by the accel key. 927 """ 928 key = args[2] 929 self.notebook.set_current_page(self.key_tab[key]) 930 return True 931 916 932 def accel_rename(self, *args): 917 933 """Callback to show the rename tab dialog. Called by the accel 918 934 key. -
src/prefs.py
diff --git a/src/prefs.py b/src/prefs.py index b0a69bf..59ba36d 100644
a b 25 25 import gconf 26 26 27 27 from simplegladeapp import SimpleGladeApp 28 from guake_globals import GCONF_PATH, KEY , ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER28 from guake_globals import GCONF_PATH, KEY 29 29 from common import * 30 import globalhotkeys31 30 32 31 # A regular expression to match possible python interpreters when 33 32 # filling interpreters combo in preferences … … 84 83 'label': _('Paste text from clipboard')}, 85 84 ]} 86 85 ] 86 for pref in HOTKEYS: 87 if pref['label'] == _('Navigation'): 88 for i in xrange(10): 89 pref['keys'].append({'key': LKEY('tab_%s' % i), 90 'label': _('Go to tab %s') % i}) 87 91 88 92 PALETTES = [ 89 93 # tango … … 412 416 def set_palette_colors(self, palette): 413 417 """Updates the color buttons with the given palette 414 418 """ 419 if palette == None: return 415 420 palette = palette.split(':') 416 421 for i in range(16): 417 422 color = gtk.gdk.color_parse(palette[i])