Exemplo n.º 1
0
	def get_items(self):
		# If we set proper desktop environment
		# We get exactly the apps shown in the menu,
		# as well as the preference panes
		desktop_type = __kupfer_settings__["desktop_type"]
		desktop_app_info_set_desktop_env(desktop_type)
		# Add this to the default
		whitelist = set([
			# if you set/reset default handler for folders it is useful
			"nautilus-folder-handler.desktop",
			# we think that these are useful to show
			"eog.desktop",
			"evince.desktop",
			"gnome-about.desktop",
			"gstreamer-properties.desktop",
			"notification-properties.desktop",
			])
		blacklist = set([
			"nautilus-home.desktop",
		])

		for item in app_info_get_all():
			id_ = item.get_id()
			if id_ in whitelist or (item.should_show() and not id_ in blacklist):
				yield AppLeaf(item)
Exemplo n.º 2
0
    def get_items(self):
        use_filter = __kupfer_settings__["desktop_filter"]
        desktop_type = __kupfer_settings__["desktop_type"]

        # Add this to the default

        for item in Gio.app_info_get_all():
            id_ = item.get_id()
            if id_ in WHITELIST_IDS or (self.should_show(
                    item, desktop_type, use_filter)
                                        and not id_ in BLACKLIST_IDS):
                yield AppLeaf(item)
Exemplo n.º 3
0
    def get_items(self):
        use_filter = __kupfer_settings__["desktop_filter"]
        desktop_type = __kupfer_settings__["desktop_type"]

        # Get all apps; this includes those only configured for
        # opening files with.
        for item in Gio.AppInfo.get_all():
            if AppSource.should_show(item, desktop_type, use_filter):
                continue
            if not item.supports_uris() and not item.supports_files():
                continue
            yield AppLeaf(item)
Exemplo n.º 4
0
	def get_items(self):
		for data_dir in config.get_data_dirs("sendto", package="Thunar"):
			for filename in os.listdir(data_dir):
				if not filename.endswith('.desktop'):
					continue
				file_path = os.path.join(data_dir, filename)
				if not os.path.isfile(file_path):
					continue
				try:
					yield AppLeaf(init_path=file_path, require_x=False)
				except InvalidDataError:
					pass
Exemplo n.º 5
0
 def get_items(self):
     is_running = launch.application_is_running
     return (AppLeaf(ai) for ai in self.all_apps if is_running(ai))