XApp.Favorites¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
Notifies when the favorites list has changed. |
Fields¶
- Inherited:
Class Details¶
- class XApp.Favorites(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod get_default()¶
- Returns:
the
XApp.Favoritesinstance for the process. Do not free.- Return type:
Returns the
XApp.Favoritesinstance.New in version 2.0.
- add(uri)¶
- Parameters:
uri (
str) – The uri the favorite is for
Adds a new favorite. If the uri already exists, this does nothing.
New in version 2.0.
- create_actions(mimetypes)¶
- Parameters:
mimetypes (
strorNone) – The mimetypes to filter for, orNoneto include all favorites.- Returns:
a new
Gtk.ActionGrouppopulated with a list of favorites, orNoneif there are no favorites.- Return type:
Generates a list of favorite GtkActions.
New in version 2.0.
- Parameters:
- Returns:
a new
Gtk.Menupopulated with a list of favorites, orNoneif there are no favorites.- Return type:
Generates a
Gtk.Menuwidget populated with favorites. The callback will be called when a menu item has been activated, and will include the uri of the respective item.New in version 2.0.
- find_by_display_name(display_name)¶
- Parameters:
display_name (
str) – The display name to lookup info for.- Returns:
an
XApp.FavoriteInfoorNoneif one was not found. This is owned by the favorites manager and should not be freed.- Return type:
Looks for an
XApp.FavoriteInfothat corresponds to display_name.New in version 2.0.
- find_by_uri(uri)¶
- Parameters:
uri (
str) – The uri to lookup info for.- Returns:
an
XApp.FavoriteInfoorNoneif one was not found. This is owned by the favorites manager and should not be freed.- Return type:
Looks for an
XApp.FavoriteInfothat corresponds to uri.New in version 2.0.
- get_favorites(mimetypes)¶
- Parameters:
mimetypes ([
str] orNone) – The mimetypes to filter by for results- Returns:
a list of
XApp.FavoriteInfos. Free the list with #g_list_free, free elements withXApp.FavoriteInfo.free.- Return type:
Gets a list of all favorites. If mimetype is not
None, the list will contain only favorites with that mimetype.New in version 2.0.
- launch(uri, timestamp)¶
- Parameters:
Opens a favorite in its default app.
New in version 2.0.
- remove(uri)¶
- Parameters:
uri (
str) – The uri for the favorite being removed
Removes a favorite from the list.
New in version 2.0.
- rename(old_uri, new_uri)¶
-
Removes old_uri and adds new_uri. This is mainly for file managers to use as a convenience instead of add/remove, and guarantees the result, without having to worry about multiple dbus calls (gsettings).
New in version 2.0.
Signal Details¶
- XApp.Favorites.signals.changed(favorites)¶
- Signal Name:
changed- Flags:
- Parameters:
favorites (
XApp.Favorites) – The object which received the signal
Notifies when the favorites list has changed.