Changeset 997:57814da33b6a for src/mlx
- Timestamp:
- 07/04/19 18:02:37 (5 years ago)
- Branch:
- python3
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/cef.py
r996 r997 323 323 """Start a browser instance in the given container with the given URL.""" 324 324 if os.name=="nt": 325 gdk.threads_enter()325 Gdk.threads_enter() 326 326 ctypes.pythonapi.PyCapsule_GetPointer.restype = ctypes.c_void_p 327 327 ctypes.pythonapi.PyCapsule_GetPointer.argtypes = \ … … 332 332 windowID = libgdk.gdk_win32_window_get_handle(gpointer) 333 333 container.windowID = windowID 334 gdk.threads_leave()334 Gdk.threads_leave() 335 335 else: 336 336 container.set_visual(container.get_screen().lookup_visual(0x21)) -
src/mlx/gui/common.py
r996 r997 23 23 import gi 24 24 gi.require_version("Gdk", "3.0") 25 from gi.repository import Gdk as gdk25 from gi.repository import Gdk 26 26 from gi.repository import GdkPixbuf as gdkPixbuf 27 27 gi.require_version("Gtk", "3.0") … … 47 47 RESPONSETYPE_CANCEL = Gtk.ResponseType.CANCEL 48 48 ACCEL_VISIBLE = Gtk.AccelFlags.VISIBLE 49 CONTROL_MASK = gdk.ModifierType.CONTROL_MASK49 CONTROL_MASK = Gdk.ModifierType.CONTROL_MASK 50 50 DIALOG_MODAL = Gtk.DialogFlags.MODAL 51 51 WRAP_WORD = Gtk.WrapMode.WORD … … 53 53 JUSTIFY_LEFT = Gtk.Justification.LEFT 54 54 55 CONTROL_MASK = gdk.ModifierType.CONTROL_MASK56 SHIFT_MASK = gdk.ModifierType.SHIFT_MASK57 BUTTON1_MASK = gdk.ModifierType.BUTTON1_MASK58 59 SCROLL_UP = gdk.ScrollDirection.UP60 SCROLL_DOWN = gdk.ScrollDirection.DOWN55 CONTROL_MASK = Gdk.ModifierType.CONTROL_MASK 56 SHIFT_MASK = Gdk.ModifierType.SHIFT_MASK 57 BUTTON1_MASK = Gdk.ModifierType.BUTTON1_MASK 58 59 SCROLL_UP = Gdk.ScrollDirection.UP 60 SCROLL_DOWN = Gdk.ScrollDirection.DOWN 61 61 62 62 SPIN_USER_DEFINED = Gtk.SpinType.USER_DEFINED … … 78 78 WEIGHT_BOLD = pango.Weight.BOLD 79 79 80 WINDOW_STATE_ICONIFIED = gdk.WindowState.ICONIFIED81 WINDOW_STATE_WITHDRAWN = gdk.WindowState.WITHDRAWN80 WINDOW_STATE_ICONIFIED = Gdk.WindowState.ICONIFIED 81 WINDOW_STATE_WITHDRAWN = Gdk.WindowState.WITHDRAWN 82 82 83 83 SORT_ASCENDING = Gtk.SortType.ASCENDING 84 84 SORT_DESCENDING = Gtk.SortType.DESCENDING 85 85 86 EVENT_BUTTON_PRESS = gdk.EventType.BUTTON_PRESS86 EVENT_BUTTON_PRESS = Gdk.EventType.BUTTON_PRESS 87 87 88 88 TREE_VIEW_COLUMN_FIXED = Gtk.TreeViewColumnSizing.FIXED -
src/mlx/gui/faultexplain.py
r996 r997 283 283 styleContext = self.get_style_context() 284 284 if allExplained: 285 outerColour = innerColour = gdk.RGBA(red = 0.0, green=0.0,285 outerColour = innerColour = Gdk.RGBA(red = 0.0, green=0.0, 286 286 blue=0.0, alpha=0.0) 287 287 else: -
src/mlx/gui/flightlist.py
r996 r997 580 580 If the Escape key is pressed, 'delete-event' is emitted to close the 581 581 window.""" 582 if gdk.keyval_name(event.keyval) == "Escape":582 if Gdk.keyval_name(event.keyval) == "Escape": 583 583 self.emit("delete-event", None) 584 584 return True … … 763 763 If the Escape key is pressed, 'delete-event' is emitted to close the 764 764 window.""" 765 if gdk.keyval_name(event.keyval) == "Escape":765 if Gdk.keyval_name(event.keyval) == "Escape": 766 766 self.emit("delete-event", None) 767 767 return True -
src/mlx/gui/gui.py
r996 r997 206 206 self._statusIcon = StatusIcon(iconDirectory, self) 207 207 208 self._busyCursor = gdk.Cursor(gdk.CursorType.WATCH)208 self._busyCursor = Gdk.Cursor(Gdk.CursorType.WATCH) 209 209 210 210 self._loadPIREPDialog = None … … 739 739 def _handleMainWindowState(self, window, event): 740 740 """Hande a change in the state of the window""" 741 iconified = gdk.WindowState.ICONIFIED741 iconified = Gdk.WindowState.ICONIFIED 742 742 743 743 if (event.changed_mask&WINDOW_STATE_WITHDRAWN)!=0: -
src/mlx/gui/statusbar.py
r996 r997 126 126 icon = self._connGreyIcon 127 127 128 gdk.cairo_set_source_pixbuf(eventOrContext, icon, 0, 0)128 Gdk.cairo_set_source_pixbuf(eventOrContext, icon, 0, 0) 129 129 eventOrContext.paint() 130 130 -
src/mlx/gui/timetable.py
r996 r997 292 292 If the Escape key is pressed, 'delete-event' is emitted to close the 293 293 window.""" 294 keyName = gdk.keyval_name(event.keyval)294 keyName = Gdk.keyval_name(event.keyval) 295 295 if keyName =="Escape": 296 296 self.emit("delete-event", None) … … 702 702 If the Escape key is pressed, 'delete-event' is emitted to close the 703 703 window.""" 704 if gdk.keyval_name(event.keyval) == "Escape":704 if Gdk.keyval_name(event.keyval) == "Escape": 705 705 self.emit("delete-event", None) 706 706 return True
Note:
See TracChangeset
for help on using the changeset viewer.