Python gi.repository.GObject 模块,Object() 实例源码

我们从Python开源项目中,提取了以下22个代码示例,用于说明如何使用gi.repository.GObject.Object()

项目:budgie-extras    作者:UbuntuBudgie    | 项目源码 | 文件源码
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    作者:edumucelli    | 项目源码 | 文件源码
def __init__(self):
        GObject.Object.__init__(self)

    # Controls the flag that indicates whether the toggle 'repeat'
    # is active or not.
项目:gedi    作者:isamert    | 项目源码 | 文件源码
def __init__(self):
        GObject.Object.__init__(self)
        self.completion_provider = None
项目:gedi    作者:isamert    | 项目源码 | 文件源码
def __init__(self):
        GObject.Object.__init__(self)
项目:Dict-O-nator    作者:theawless    | 项目源码 | 文件源码
def __init__(self):
        GObject.Object.__init__(self)
        self.menu_ext = None
项目:Dict-O-nator    作者:theawless    | 项目源码 | 文件源码
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')
项目:PyIDE    作者:raggesilver    | 项目源码 | 文件源码
def __init__(self, parent):
        GObject.Object.__init__(self)
        self.completion_provider = None
        self.view = parent.sview
        self.parent = parent
项目:PyIDE    作者:raggesilver    | 项目源码 | 文件源码
def __init__(self):
        GObject.Object.__init__(self)
项目:budgie-extras    作者:UbuntuBudgie    | 项目源码 | 文件源码
def __init__(self):
        """ Initialisation is important.
        """
        GObject.Object.__init__(self)
项目:gedit-jshint    作者:Meseira    | 项目源码 | 文件源码
def __init__(self):
        GObject.Object.__init__(self)

        self._action = None
        self._config_panel = None
        self._jshint = None
        self._output_panel = None
项目:gedit-jshint    作者:Meseira    | 项目源码 | 文件源码
def __init__(self):
        GObject.Object.__init__(self)
        self._menu_ext = None
项目:gedit-scroll-past    作者:hardpixel    | 项目源码 | 文件源码
def __init__(self):
    GObject.Object.__init__(self)

    self._style_provider = None
    self._current_screen = None
项目:gedit-dark-variant    作者:hardpixel    | 项目源码 | 文件源码
def __init__(self):
    GObject.Object.__init__(self)

    self._settings = None
项目:gedit-strip-whitespace    作者:hardpixel    | 项目源码 | 文件源码
def __init__(self):
    GObject.Object.__init__(self)

    self._document   = None
    self._handler_id = None
项目:gedit-panel-toggler    作者:hardpixel    | 项目源码 | 文件源码
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    作者:isamert    | 项目源码 | 文件源码
def __init__(self):
        GObject.Object.__init__(self)

        self.completion_provider = None
        self.handler_on_view_populate_popup = None
项目:gracer    作者:isamert    | 项目源码 | 文件源码
def __init__(self, _racer):
        GObject.Object.__init__(self)
        self.racer = _racer
项目:transmission-remote-gnome    作者:TingPing    | 项目源码 | 文件源码
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)
项目:transmission-remote-gnome    作者:TingPing    | 项目源码 | 文件源码
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
项目:gedit-smart-home    作者:hardpixel    | 项目源码 | 文件源码
def __init__(self):
    GObject.Object.__init__(self)
项目:gedit-cut-line    作者:hardpixel    | 项目源码 | 文件源码
def __init__(self):
    GObject.Object.__init__(self)

    self._handler_id = None
项目:my-weather-indicator    作者:atareao    | 项目源码 | 文件源码
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()