32 lines
1.4 KiB
Diff
32 lines
1.4 KiB
Diff
Index: virt-manager-0.3.0/src/virtManager/console.py
|
|
===================================================================
|
|
--- virt-manager-0.3.0.orig/src/virtManager/console.py
|
|
+++ virt-manager-0.3.0/src/virtManager/console.py
|
|
@@ -43,6 +43,7 @@ class vmmConsole(gobject.GObject):
|
|
self.window = gtk.glade.XML(config.get_glade_file(), "vmm-console", domain="virt-manager")
|
|
self.config = config
|
|
self.vm = vm
|
|
+ self.grab_notifications = 1
|
|
|
|
topwin = self.window.get_widget("vmm-console")
|
|
sens = (self.window.get_widget("menubar2"),
|
|
@@ -118,6 +119,10 @@ class vmmConsole(gobject.GObject):
|
|
|
|
def notify_grabbed(self, src):
|
|
topwin = self.window.get_widget("vmm-console")
|
|
+ topwin.set_title(_("Press Ctrl+Alt to release mouse.") + " " + self.title)
|
|
+ if not self.grab_notifications:
|
|
+ return
|
|
+ self.grab_notifications -= 1
|
|
try:
|
|
bus = dbus.SessionBus()
|
|
noteSvr = bus.get_object("org.freedesktop.Notifications", "/org/freedesktop/Notifications")
|
|
@@ -136,7 +141,6 @@ class vmmConsole(gobject.GObject):
|
|
5 * 1000);
|
|
except Exception, e:
|
|
pass
|
|
- topwin.set_title(_("Press Ctrl+Alt to release mouse.") + " " + self.title)
|
|
|
|
def notify_ungrabbed(self, src):
|
|
topwin = self.window.get_widget("vmm-console")
|