我们从Python开源项目中,提取了以下22个代码示例,用于说明如何使用gi.repository.GObject.Object()。
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()
def __init__(self): GObject.Object.__init__(self) # Controls the flag that indicates whether the toggle 'repeat' # is active or not.
def __init__(self): GObject.Object.__init__(self) self.completion_provider = None
def __init__(self): GObject.Object.__init__(self)
def __init__(self): GObject.Object.__init__(self) self.menu_ext = None
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')
def __init__(self, parent): GObject.Object.__init__(self) self.completion_provider = None self.view = parent.sview self.parent = parent
def __init__(self): """ Initialisation is important. """ GObject.Object.__init__(self)
def __init__(self): GObject.Object.__init__(self) self._action = None self._config_panel = None self._jshint = None self._output_panel = None
def __init__(self): GObject.Object.__init__(self) self._menu_ext = None
def __init__(self): GObject.Object.__init__(self) self._style_provider = None self._current_screen = None
def __init__(self): GObject.Object.__init__(self) self._settings = None
def __init__(self): GObject.Object.__init__(self) self._document = None self._handler_id = None
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
def __init__(self): GObject.Object.__init__(self) self.completion_provider = None self.handler_on_view_populate_popup = None
def __init__(self, _racer): GObject.Object.__init__(self) self.racer = _racer
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)
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
def __init__(self): GObject.Object.__init__(self) self._handler_id = None
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()