virt-manager/virtman-limit-popup.diff

32 lines
1.4 KiB
Diff

Index: virt-manager-0.4.0/src/virtManager/console.py
===================================================================
--- virt-manager-0.4.0.orig/src/virtManager/console.py
+++ virt-manager-0.4.0/src/virtManager/console.py
@@ -47,6 +47,7 @@ class vmmConsole(gobject.GObject):
self.window = gtk.glade.XML(config.get_glade_dir() + "/vmm-console.glade", "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"),
@@ -123,6 +124,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 pointer.") + " " + 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")
@@ -141,7 +146,6 @@ class vmmConsole(gobject.GObject):
5 * 1000);
except Exception, e:
pass
- topwin.set_title(_("Press Ctrl+Alt to release pointer.") + " " + self.title)
def notify_ungrabbed(self, src):
topwin = self.window.get_widget("vmm-console")