Changeset 927:566a7479b869


Ignore:
Timestamp:
04/27/19 12:17:34 (4 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

Update to Gtk 3 API changes (re #347).

Location:
src/mlx/gui
Files:
2 edited

Legend:

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

    r919 r927  
    171171    def hasFlights(self):
    172172        """Determine if there are any flights in the list."""
    173         return self._model.get_iter_root() is not None
     173        return self._model.get_iter_first() is not None
    174174
    175175    def clear(self):
     
    271271    def __init__(self, which, wizard, window, pirepEditable = False):
    272272        """Construct the frame with the given title."""
    273         super(PendingFlightsFrame, self).__init__(xstr("pendflt_title_" + which))
     273        super(PendingFlightsFrame, self).__init__()
     274        self.set_label(xstr("pendflt_title_" + which))
    274275
    275276        self._which = which
  • src/mlx/gui/timetable.py

    r923 r927  
    8282        self._view = gtk.TreeView(self._model)
    8383
    84         self._tooltips = gtk.Tooltips()
    85         self._tooltips.disable()
    8684        self._view.connect("motion-notify-event", self._updateTooltip)
    8785
     
    225223            result = widget.get_path_at_pos( int(event.x), int(event.y))
    226224            if result is None:
    227                 self._tooltips.set_tip(widget, "")
    228                 self._tooltips.disable()
     225                widget.set_tooltip_text("")
    229226            else:
    230227                (path, col, x, y) = result
     
    244241                        text += date.strftime("%Y-%m-%d")
    245242
    246                     self._tooltips.set_tip(widget, text)
    247                     self._tooltips.enable()
     243                    widget.set_tooltip_text(text)
    248244                else:
    249                     self._tooltips.set_tip(widget, "")
    250                     self._tooltips.disable()
     245                    widget.set_tooltip_text("")
    251246        except Exception as e:
    252247            print(e)
    253             self._tooltips.set_tip(widget, "")
    254             self._tooltips.disable()
     248            widget.set_tooltip_text("")
     249
     250#-----------------------------------------------------------------------------
     251
     252gobject.signal_new("row-activated", Timetable, gobject.SIGNAL_RUN_FIRST,
     253                   None, (int,))
     254
     255gobject.signal_new("selection-changed", Timetable, gobject.SIGNAL_RUN_FIRST,
     256                   None, (object,))
    255257
    256258#-----------------------------------------------------------------------------
     
    520522                                        xscale = 1.0, yscale = 1.0)
    521523
    522         filterFrame = gtk.Frame(xstr("timetable_filter"))
     524        filterFrame = gtk.Frame()
     525        filterFrame.set_label(xstr("timetable_filter"))
    523526
    524527        filterVBox = gtk.VBox()
Note: See TracChangeset for help on using the changeset viewer.