From 250dff377ec23bbaf3a649192211ffda7a67d7cf Mon Sep 17 00:00:00 2001
From: Aleksandar Krsteski <alekrsteski@gmail.com>
Date: Tue, 17 Mar 2009 22:10:29 +0100
Subject: [PATCH 1/2] Allow copying of links by right-click -> Copy.
---
src/guake.py | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/guake.py b/src/guake.py
index e3765fc..1ebc6f4 100644
|
a
|
b
|
|
| 415 | 415 | any match string is caught, another aplication is open to |
| 416 | 416 | handle the matched resource uri. |
| 417 | 417 | """ |
| | 418 | self.matched_value = '' |
| 418 | 419 | matched_string = self.match_check( |
| 419 | 420 | int(event.x / self.get_char_width()), |
| 420 | 421 | int(event.y / self.get_char_height())) |
| … |
… |
|
| 436 | 437 | # I'm temporarely using this little hammer because |
| 437 | 438 | # gtk_show_uri seem to not be binded to python yet. |
| 438 | 439 | open_uri(value) |
| 439 | | |
| | 440 | elif event.button == 3 and matched_string: |
| | 441 | self.matched_value = matched_string[0] |
| 440 | 442 | |
| 441 | 443 | class GuakeTerminalBox(gtk.HBox): |
| 442 | 444 | """A box to group the terminal and a scrollbar. |
| … |
… |
|
| 790 | 792 | """Callback to copy text in the shown terminal. Called by the |
| 791 | 793 | accel key. |
| 792 | 794 | """ |
| 793 | | pos = self.notebook.get_current_page() |
| 794 | | self.term_list[pos].copy_clipboard() |
| | 795 | current_term = self.term_list[self.notebook.get_current_page()] |
| | 796 | |
| | 797 | if current_term.get_has_selection(): |
| | 798 | current_term.copy_clipboard() |
| | 799 | elif current_term.matched_value: |
| | 800 | guake_clipboard = gtk.clipboard_get() |
| | 801 | guake_clipboard.set_text(current_term.matched_value) |
| | 802 | |
| 795 | 803 | return True |
| 796 | 804 | |
| 797 | 805 | def accel_paste_clipboard(self, *args): |