Changeset 926:4cfa5825f5ab


Ignore:
Timestamp:
04/27/19 12:15:15 (6 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

If the AppIndicator module is not available, it is ignored properly (re #347).

File:
1 edited

Legend:

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

    r925 r926  
    126126    gi.require_version("Gtk", "3.0")
    127127    from gi.repository import Gtk as gtk
    128     from gi.repository import AppIndicator3 as appindicator
     128    try:
     129        gi.require_version("AppIndicator3", "0.1")
     130        from gi.repository import AppIndicator3 as appindicator
     131        appIndicator = True
     132    except:
     133        pass
    129134    from gi.repository import Pango as pango
    130135
    131     appIndicator = True
    132136
    133137
     
    299303    def __init__(self):
    300304        """Construct the entry"""
    301         super(TimeEntry, self).__init__(max = 5)
     305        super(TimeEntry, self).__init__()
     306        self.set_max_width_chars(5)
    302307
    303308        self.connect("insert-text", self._insertText)
Note: See TracChangeset for help on using the changeset viewer.