python类Object()的实例源码

budgie-wsoverview.py 文件源码 项目:budgie-extras 作者: UbuntuBudgie 项目源码 文件源码 阅读 34 收藏 0 点赞 0 评论 0
def __init__(self):

        GObject.Object.__init__(self)
        settings = Gio.Settings.new("org.ubuntubudgie.plugins.budgie-extras")
        settings.bind("ws-overview-index", self,
                      'mode_index',
                      Gio.SettingsBindFlags.DEFAULT)
        # general
        self.mode = modes[self.mode_index]

        self.appbutton = Gtk.Button.new()
        self.appbutton.set_relief(Gtk.ReliefStyle.NONE)

        icon = Gtk.Image.new_from_icon_name("1-wso", Gtk.IconSize.MENU)
        self.appbutton.set_image(icon)

        self.menu = Gtk.Menu()
        self.create_menu()
        self.update = Thread(target=self.show_seconds)
        # daemonize the thread to make the indicator stopable
        self.update.setDaemon(True)
        self.update.start()
repeat-one-song.py 文件源码 项目:repeat-one-song 作者: edumucelli 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def __init__(self):
        GObject.Object.__init__(self)

    # Controls the flag that indicates whether the toggle 'repeat'
    # is active or not.
gedi.py 文件源码 项目:gedi 作者: isamert 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def __init__(self):
        GObject.Object.__init__(self)
        self.completion_provider = None
gedi.py 文件源码 项目:gedi 作者: isamert 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self):
        GObject.Object.__init__(self)
__init__.py 文件源码 项目:Dict-O-nator 作者: theawless 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __init__(self):
        GObject.Object.__init__(self)
        self.menu_ext = None
__init__.py 文件源码 项目:Dict-O-nator 作者: theawless 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def __init__(self):
        """Constructor for UI handler."""
        GObject.Object.__init__(self)
        self.bottom_widget = Gtk.Builder()
        self.bottom_widget.add_from_file(BOTTOM_WIDGET_UI_PATH)
        # Get the plugin manager
        self.plugin_manager = DictonatorActionHandler(self.bottom_bar_text_changer, self.bottom_bar_handler)
        logger.debug('UI INIT')
autoComplete.py 文件源码 项目:PyIDE 作者: raggesilver 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def __init__(self, parent):
        GObject.Object.__init__(self)
        self.completion_provider = None
        self.view = parent.sview
        self.parent = parent
autoComplete.py 文件源码 项目:PyIDE 作者: raggesilver 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def __init__(self):
        GObject.Object.__init__(self)
budgie-wsoverview.py 文件源码 项目:budgie-extras 作者: UbuntuBudgie 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def __init__(self):
        """ Initialisation is important.
        """
        GObject.Object.__init__(self)
windowactivatable.py 文件源码 项目:gedit-jshint 作者: Meseira 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self):
        GObject.Object.__init__(self)

        self._action = None
        self._config_panel = None
        self._jshint = None
        self._output_panel = None
appactivatable.py 文件源码 项目:gedit-jshint 作者: Meseira 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def __init__(self):
        GObject.Object.__init__(self)
        self._menu_ext = None
scroll_past.py 文件源码 项目:gedit-scroll-past 作者: hardpixel 项目源码 文件源码 阅读 32 收藏 0 点赞 0 评论 0
def __init__(self):
    GObject.Object.__init__(self)

    self._style_provider = None
    self._current_screen = None
dark_variant.py 文件源码 项目:gedit-dark-variant 作者: hardpixel 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def __init__(self):
    GObject.Object.__init__(self)

    self._settings = None
strip_whitespace.py 文件源码 项目:gedit-strip-whitespace 作者: hardpixel 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __init__(self):
    GObject.Object.__init__(self)

    self._document   = None
    self._handler_id = None
panel_toggler.py 文件源码 项目:gedit-panel-toggler 作者: hardpixel 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __init__(self):
    GObject.Object.__init__(self)

    self._header_bar    = None
    self._bottom_panel  = None
    self._side_panel    = None
    self._panel_sidebar = None
    self._left_button   = None
    self._bottom_button = None
gracer.py 文件源码 项目:gracer 作者: isamert 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self):
        GObject.Object.__init__(self)

        self.completion_provider = None
        self.handler_on_view_populate_popup = None
gracer.py 文件源码 项目:gracer 作者: isamert 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def __init__(self, _racer):
        GObject.Object.__init__(self)
        self.racer = _racer
list_model_override.py 文件源码 项目:transmission-remote-gnome 作者: TingPing 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def __setitem__(self, key: int, value: GObject.Object):
        if not isinstance(key, self._type):
            raise TypeError()
        if key >= len(self):
            raise IndexError()
        self._store.insert(key, value)
list_wrapper.py 文件源码 项目:transmission-remote-gnome 作者: TingPing 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def new_for_model(cls, model: Gio.ListModel, properties_map):
        """
        properties_map: Ordered Dict of property names and types to map
        """
        self = cls()

        self._property_types = list(properties_map.values()) + [GObject.Object]
        self.set_column_types(self._property_types)

        self._model = model
        self.properties = list(properties_map.keys())
        self._model.connect('items-changed', self._on_items_changed)
        self._on_items_changed(model, 0, 0, model.get_n_items())
        return self
smart_home.py 文件源码 项目:gedit-smart-home 作者: hardpixel 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def __init__(self):
    GObject.Object.__init__(self)
cut_line.py 文件源码 项目:gedit-cut-line 作者: hardpixel 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def __init__(self):
    GObject.Object.__init__(self)

    self._handler_id = None
myweatherindicator.py 文件源码 项目:my-weather-indicator 作者: atareao 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def __init__(self):
        GObject.Object.__init__(self)
        if dbus.SessionBus().request_name('es.atareao.MyWeatherIndicator') !=\
                dbus.bus.REQUEST_NAME_REPLY_PRIMARY_OWNER:
            print("application already running")
            exit(0)
        #
        self.weather_updater = 0
        self.widgets_updater = 0
        self.internet_updater = 0
        self.internet_connection = False
        self.menus = []
        self.indicators = []
        self.notifications = []
        self.widgets = []
        self.weatherservices = []
        self.weathers = []
        self.current_conditions = []
        self.preferences = []
        self.last_update_time = 0
        # Iniciate variables
        for i in range(INDICATORS):
            self.menus.append(None)
            self.indicators.append(None)
            self.notifications.append(None)
            self.widgets.append(None)
            self.weatherservices.append(None)
            self.weathers.append(None)
            self.current_conditions.append(None)
            self.preferences.append(None)
        #
        status = appindicator.IndicatorCategory.APPLICATION_STATUS
        self.notifications[0] = Notify.Notification.new('', '', None)
        self.indicators[0] = appindicator.Indicator.new(
            'My-Weather-Indicator', 'My-Weather-Indicator', status)
        self.notifications[1] = Notify.Notification.new('', '', None)
        self.indicators[1] = appindicator.Indicator.new(
            'My-Weather-Indicator2', 'My-Weather-Indicator', status)
        for i in range(INDICATORS):
            self.create_menu(i)
        for i in range(INDICATORS):
            self.widgets[i] = None
        self.load_preferences()


问题


面经


文章

微信
公众号

扫码关注公众号