Added button to make VNC window fullscreen

This commit is contained in:
Daniel P. Berrange 2006-08-29 16:57:50 -04:00
parent 6cf4da60a4
commit 8b36043ad7
2 changed files with 28 additions and 0 deletions

View File

@ -3305,6 +3305,24 @@ Máirín Duffy <duffy@redhat.com>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<widget class="GtkToggleToolButton" id="control-fullscreen">
<property name="visible">True</property>
<property name="label" translatable="yes">Full screen</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-zoom-fit</property>
<property name="visible_horizontal">True</property>
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
<property name="active">False</property>
<signal name="toggled" handler="on_control_fullscreen_toggled" last_modification_time="Tue, 29 Aug 2006 20:00:28 GMT"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>

View File

@ -87,6 +87,8 @@ class vmmConsole(gobject.GObject):
"on_control_shutdown_clicked": self.control_vm_shutdown,
"on_control_pause_toggled": self.control_vm_pause,
"on_control_fullscreen_toggled": self.toggle_fullscreen,
"on_menu_vm_run_activate": self.control_vm_run,
"on_menu_vm_shutdown_activate": self.control_vm_shutdown,
"on_menu_vm_pause_activate": self.control_vm_pause,
@ -126,6 +128,14 @@ class vmmConsole(gobject.GObject):
vp.set_size_request(vncWidth+2, vncHeight+2)
def toggle_fullscreen(self, src):
if src.get_active():
self.window.get_widget("vmm-console").fullscreen()
#gtk.gdk.keyboard_grab(self.window.get_widget("vmm-console").get_root_window())
else:
self.window.get_widget("vmm-console").unfullscreen()
#gtk.gdk.keyboard_ungrab()
def show(self):
dialog = self.window.get_widget("vmm-console")