Hook the log viewer to F12

This commit is contained in:
Marco Pesenti Gritti 2006-10-16 15:29:32 +02:00
parent 07dd398e22
commit 5cee6aa01d
3 changed files with 16 additions and 6 deletions

1
README
View File

@ -24,3 +24,4 @@ F3 Friends zoom level
F4 Mesh zoom level F4 Mesh zoom level
F5 Show the frame F5 Show the frame
F6 Open a terminal activity F6 Open a terminal activity
F12 Open the log viewer

View File

@ -5,3 +5,5 @@
<Alt>n=next <Alt>n=next
<Alt>p=prev <Alt>p=prev
<Alt>c=close <Alt>c=close
F12=!sugar-log-viewer

View File

@ -46,6 +46,12 @@ class LogBuffer(gtk.TextBuffer):
return True return True
window = gtk.Window() window = gtk.Window()
window.set_default_size(gtk.gdk.screen_width() * 3 / 4,
gtk.gdk.screen_height() * 3 / 4)
window.realize()
window.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
scrolled = gtk.ScrolledWindow() scrolled = gtk.ScrolledWindow()
scrolled.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) scrolled.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
@ -58,6 +64,7 @@ textview.show()
window.add(scrolled) window.add(scrolled)
scrolled.show() scrolled.show()
window.show() window.show()
gtk.main() gtk.main()