[gedit-latex] s/Gdk.EventMask.CONTROL_MASK/Gdk.ModifierType.CONTROL_MASK
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-latex] s/Gdk.EventMask.CONTROL_MASK/Gdk.ModifierType.CONTROL_MASK
- Date: Thu, 23 Jun 2011 22:10:58 +0000 (UTC)
commit 7d5942c762ccf750346b441c99ea92e96207609d
Author: John Stowers <john stowers gmail com>
Date: Fri Jun 24 10:06:49 2011 +1200
s/Gdk.EventMask.CONTROL_MASK/Gdk.ModifierType.CONTROL_MASK
latex/base/__init__.py | 2 +-
latex/latex/livepreview.py | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/latex/base/__init__.py b/latex/base/__init__.py
index 75a2bee..579b35e 100644
--- a/latex/base/__init__.py
+++ b/latex/base/__init__.py
@@ -513,7 +513,7 @@ class Editor(object):
# start of buffer reached
return
- elif event.button == 1 and event.get_state() & Gdk.EventMask.CONTROL_MASK:
+ elif event.button == 1 and event.get_state() & Gdk.ModifierType.CONTROL_MASK:
x, y = text_view.get_pointer()
x, y = text_view.window_to_buffer_coords(Gtk.TextWindowType.WIDGET, x, y)
it = text_view.get_iter_at_location(x, y)
diff --git a/latex/latex/livepreview.py b/latex/latex/livepreview.py
index 1f2af06..3b3c0cf 100644
--- a/latex/latex/livepreview.py
+++ b/latex/latex/livepreview.py
@@ -786,14 +786,14 @@ class PreviewLink(Gtk.EventBox):
def __on_button_press(self, widget, event):
# prevent the signal from being passed to the preview panel,
# except for Ctrl+Left button for synctex
- if event.button == 1 and not (event.get_state() & Gdk.EventMask.CONTROL_MASK):
+ if event.button == 1 and not (event.get_state() & Gdk.ModifierType.CONTROL_MASK):
return True
else:
return False
def __on_button_release(self, widget, event):
- if event.get_state() & Gdk.EventMask.CONTROL_MASK:
+ if event.get_state() & Gdk.ModifierType.CONTROL_MASK:
return False
self.__preview_panel.set_cursor(PreviewPanel.CURSOR_DEFAULT)
@@ -1193,7 +1193,7 @@ class PreviewPanel:
elif key == "equal":
self.zoom_to(1.0, self.ZOOM_NORMAL)
elif key == "Page_Up":
- if event.get_state() & Gdk.EventMask.CONTROL_MASK:
+ if event.get_state() & Gdk.ModifierType.CONTROL_MASK:
self.go_to_page(-1, True)
else:
# We do it manually... should be in a method
@@ -1204,7 +1204,7 @@ class PreviewPanel:
if self.__type_of_view == self.VIEW_SINGLE_PAGE:
self.__decide_page_change(vadj, Gdk.ScrollDirection.UP)
elif key == "Page_Down":
- if event.get_state() & Gdk.EventMask.CONTROL_MASK:
+ if event.get_state() & Gdk.ModifierType.CONTROL_MASK:
self.go_to_page(1, True)
else:
# We do it manually... should be in a method
@@ -1213,13 +1213,13 @@ class PreviewPanel:
if self.__type_of_view == self.VIEW_SINGLE_PAGE:
self.__decide_page_change(vadj, Gdk.ScrollDirection.DOWN)
elif key == "Home":
- if event.get_state() & Gdk.EventMask.CONTROL_MASK:
+ if event.get_state() & Gdk.ModifierType.CONTROL_MASK:
self.go_to_page(0)
else:
vadj = self.get_vadjustment()
vadj.set_value(vadj.lower)
elif key == "End":
- if event.get_state() & Gdk.EventMask.CONTROL_MASK:
+ if event.get_state() & Gdk.ModifierType.CONTROL_MASK:
self.go_to_page(-1)
else:
vadj = self.get_vadjustment()
@@ -1765,7 +1765,7 @@ class PreviewPanel:
x = event.x
y = event.y
- if event.get_state() & Gdk.EventMask.CONTROL_MASK:
+ if event.get_state() & Gdk.ModifierType.CONTROL_MASK:
self.__sync_edit(x,y)
else:
self.__glass_drag.start(self.__magnifying_glass, x, y)
@@ -1937,7 +1937,7 @@ class PreviewPanel:
triggers Next/Previous page.
"""
- if event.get_state() & Gdk.EventMask.CONTROL_MASK:
+ if event.get_state() & Gdk.ModifierType.CONTROL_MASK:
if event.direction == Gdk.ScrollDirection.DOWN:
self.zoom_out()
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]