Changeset 997:57814da33b6a


Ignore:
Timestamp:
07/04/19 18:02:37 (5 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

Using 'Gdk' instead of 'gdk' (re #347)

Location:
src/mlx/gui
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/cef.py

    r996 r997  
    323323    """Start a browser instance in the given container with the given URL."""
    324324    if os.name=="nt":
    325         gdk.threads_enter()
     325        Gdk.threads_enter()
    326326        ctypes.pythonapi.PyCapsule_GetPointer.restype = ctypes.c_void_p
    327327        ctypes.pythonapi.PyCapsule_GetPointer.argtypes = \
     
    332332        windowID = libgdk.gdk_win32_window_get_handle(gpointer)
    333333        container.windowID = windowID
    334         gdk.threads_leave()
     334        Gdk.threads_leave()
    335335    else:
    336336        container.set_visual(container.get_screen().lookup_visual(0x21))
  • src/mlx/gui/common.py

    r996 r997  
    2323import gi
    2424gi.require_version("Gdk", "3.0")
    25 from gi.repository import Gdk as gdk
     25from gi.repository import Gdk
    2626from gi.repository import GdkPixbuf as gdkPixbuf
    2727gi.require_version("Gtk", "3.0")
     
    4747RESPONSETYPE_CANCEL = Gtk.ResponseType.CANCEL
    4848ACCEL_VISIBLE = Gtk.AccelFlags.VISIBLE
    49 CONTROL_MASK = gdk.ModifierType.CONTROL_MASK
     49CONTROL_MASK = Gdk.ModifierType.CONTROL_MASK
    5050DIALOG_MODAL = Gtk.DialogFlags.MODAL
    5151WRAP_WORD = Gtk.WrapMode.WORD
     
    5353JUSTIFY_LEFT = Gtk.Justification.LEFT
    5454
    55 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
     55CONTROL_MASK = Gdk.ModifierType.CONTROL_MASK
     56SHIFT_MASK = Gdk.ModifierType.SHIFT_MASK
     57BUTTON1_MASK = Gdk.ModifierType.BUTTON1_MASK
     58
     59SCROLL_UP = Gdk.ScrollDirection.UP
     60SCROLL_DOWN = Gdk.ScrollDirection.DOWN
    6161
    6262SPIN_USER_DEFINED = Gtk.SpinType.USER_DEFINED
     
    7878WEIGHT_BOLD = pango.Weight.BOLD
    7979
    80 WINDOW_STATE_ICONIFIED = gdk.WindowState.ICONIFIED
    81 WINDOW_STATE_WITHDRAWN = gdk.WindowState.WITHDRAWN
     80WINDOW_STATE_ICONIFIED = Gdk.WindowState.ICONIFIED
     81WINDOW_STATE_WITHDRAWN = Gdk.WindowState.WITHDRAWN
    8282
    8383SORT_ASCENDING = Gtk.SortType.ASCENDING
    8484SORT_DESCENDING = Gtk.SortType.DESCENDING
    8585
    86 EVENT_BUTTON_PRESS = gdk.EventType.BUTTON_PRESS
     86EVENT_BUTTON_PRESS = Gdk.EventType.BUTTON_PRESS
    8787
    8888TREE_VIEW_COLUMN_FIXED = Gtk.TreeViewColumnSizing.FIXED
  • src/mlx/gui/faultexplain.py

    r996 r997  
    283283        styleContext = self.get_style_context()
    284284        if allExplained:
    285             outerColour = innerColour = gdk.RGBA(red = 0.0, green=0.0,
     285            outerColour = innerColour = Gdk.RGBA(red = 0.0, green=0.0,
    286286                                                 blue=0.0, alpha=0.0)
    287287        else:
  • src/mlx/gui/flightlist.py

    r996 r997  
    580580        If the Escape key is pressed, 'delete-event' is emitted to close the
    581581        window."""
    582         if gdk.keyval_name(event.keyval) == "Escape":
     582        if Gdk.keyval_name(event.keyval) == "Escape":
    583583            self.emit("delete-event", None)
    584584            return True
     
    763763        If the Escape key is pressed, 'delete-event' is emitted to close the
    764764        window."""
    765         if gdk.keyval_name(event.keyval) == "Escape":
     765        if Gdk.keyval_name(event.keyval) == "Escape":
    766766            self.emit("delete-event", None)
    767767            return True
  • src/mlx/gui/gui.py

    r996 r997  
    206206        self._statusIcon = StatusIcon(iconDirectory, self)
    207207
    208         self._busyCursor = gdk.Cursor(gdk.CursorType.WATCH)
     208        self._busyCursor = Gdk.Cursor(Gdk.CursorType.WATCH)
    209209
    210210        self._loadPIREPDialog = None
     
    739739    def _handleMainWindowState(self, window, event):
    740740        """Hande a change in the state of the window"""
    741         iconified = gdk.WindowState.ICONIFIED
     741        iconified = Gdk.WindowState.ICONIFIED
    742742
    743743        if (event.changed_mask&WINDOW_STATE_WITHDRAWN)!=0:
  • src/mlx/gui/statusbar.py

    r996 r997  
    126126            icon = self._connGreyIcon
    127127
    128         gdk.cairo_set_source_pixbuf(eventOrContext, icon, 0, 0)
     128        Gdk.cairo_set_source_pixbuf(eventOrContext, icon, 0, 0)
    129129        eventOrContext.paint()
    130130
  • src/mlx/gui/timetable.py

    r996 r997  
    292292        If the Escape key is pressed, 'delete-event' is emitted to close the
    293293        window."""
    294         keyName = gdk.keyval_name(event.keyval)
     294        keyName = Gdk.keyval_name(event.keyval)
    295295        if keyName =="Escape":
    296296            self.emit("delete-event", None)
     
    702702        If the Escape key is pressed, 'delete-event' is emitted to close the
    703703        window."""
    704         if gdk.keyval_name(event.keyval) == "Escape":
     704        if Gdk.keyval_name(event.keyval) == "Escape":
    705705            self.emit("delete-event", None)
    706706            return True
Note: See TracChangeset for help on using the changeset viewer.