[gedit] Grab focus on the python console when showing it
- From: Paolo Borelli <pborelli src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gedit] Grab focus on the python console when showing it
- Date: Sat, 1 Aug 2009 12:53:31 +0000 (UTC)
commit 302d41a59537914c6a10b6f7626053d3e0f443dd
Author: Paolo Borelli <porelli gnome org>
Date: Sat Aug 1 14:48:09 2009 +0200
Grab focus on the python console when showing it
plugins/pythonconsole/pythonconsole/console.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/plugins/pythonconsole/pythonconsole/console.py b/plugins/pythonconsole/pythonconsole/console.py
index 657db2c..7700242 100644
--- a/plugins/pythonconsole/pythonconsole/console.py
+++ b/plugins/pythonconsole/pythonconsole/console.py
@@ -37,6 +37,11 @@ from config import PythonConsoleConfig
__all__ = ('PythonConsole', 'OutFile')
class PythonConsole(gtk.ScrolledWindow):
+
+ __gsignals__ = {
+ 'grab-focus' : 'override',
+ }
+
def __init__(self, namespace = {}):
gtk.ScrolledWindow.__init__(self)
@@ -81,6 +86,9 @@ class PythonConsole(gtk.ScrolledWindow):
self.view.connect("key-press-event", self.__key_press_event_cb)
buffer.connect("mark-set", self.__mark_set_cb)
+ def do_grab_focus(self):
+ self.view.grab_focus()
+
def apply_preferences(self, *args):
config = PythonConsoleConfig()
self.error.set_property("foreground", config.color_error)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]