From ee690410d9cc61db7ac6a2b263d9b2dd6e7d07b4 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 14 Nov 2014 18:16:11 +0000 Subject: [PATCH] use compat layer for event mask git-svn-id: https://xpra.org/svn/Xpra/trunk@8113 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/client/gtk_base/gtk_tray_menu_base.py | 4 ++-- src/xpra/gtk_common/gtk_util.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xpra/client/gtk_base/gtk_tray_menu_base.py b/src/xpra/client/gtk_base/gtk_tray_menu_base.py index ca0e4ae739..a85b1f9b34 100644 --- a/src/xpra/client/gtk_base/gtk_tray_menu_base.py +++ b/src/xpra/client/gtk_base/gtk_tray_menu_base.py @@ -11,7 +11,7 @@ gobject = import_gobject() from xpra.util import CLIENT_EXIT -from xpra.gtk_common.gtk_util import ensure_item_selected, menuitem +from xpra.gtk_common.gtk_util import ensure_item_selected, menuitem, BUTTON_PRESS_MASK from xpra.client.client_base import EXIT_OK from xpra.client.gtk_base.about import about, close_about from xpra.codecs.loader import PREFERED_ENCODING_ORDER, ENCODINGS_HELP, ENCODINGS_TO_NAME @@ -61,7 +61,7 @@ def __init__(self, label, tooltip=None): self.label = label if tooltip: self.set_tooltip_text(tooltip) - self.add_events(gtk.gdk.BUTTON_PRESS_MASK) + self.add_events(BUTTON_PRESS_MASK) self.connect("button-release-event", self.on_button_release_event) def on_button_release_event(self, *args): diff --git a/src/xpra/gtk_common/gtk_util.py b/src/xpra/gtk_common/gtk_util.py index a18d69c314..7b54c6c9a8 100644 --- a/src/xpra/gtk_common/gtk_util.py +++ b/src/xpra/gtk_common/gtk_util.py @@ -97,6 +97,7 @@ def pixbuf_new_from_data(*args): FILE_CHOOSER_ACTION_SAVE = gtk.FileChooserAction.SAVE FILE_CHOOSER_ACTION_OPEN = gtk.FileChooserAction.OPEN PROPERTY_CHANGE_MASK = gdk.EventMask.PROPERTY_CHANGE_MASK + BUTTON_PRESS_MASK = gdk.EventMask.BUTTON_PRESS_MASK ACCEL_LOCKED = gtk.AccelFlags.LOCKED ACCEL_VISIBLE = gtk.AccelFlags.VISIBLE JUSTIFY_LEFT = gtk.Justification.LEFT @@ -200,6 +201,7 @@ def cairo_set_source_pixbuf(cr, pixbuf, x, y): FILE_CHOOSER_ACTION_SAVE = gtk.FILE_CHOOSER_ACTION_SAVE FILE_CHOOSER_ACTION_OPEN = gtk.FILE_CHOOSER_ACTION_OPEN PROPERTY_CHANGE_MASK = gdk.PROPERTY_CHANGE_MASK + BUTTON_PRESS_MASK = gdk.BUTTON_PRESS_MASK ACCEL_LOCKED = gtk.ACCEL_LOCKED ACCEL_VISIBLE = gtk.ACCEL_VISIBLE JUSTIFY_LEFT = gtk.JUSTIFY_LEFT