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.Favorites
instance for the process. Do not free.- Return type:
Returns the
XApp.Favorites
instance.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 (
str
orNone
) – The mimetypes to filter for, orNone
to include all favorites.- Returns:
a new
Gtk.ActionGroup
populated with a list of favorites, orNone
if there are no favorites.- Return type:
Generates a list of favorite GtkActions.
New in version 2.0.
- Parameters:
- Returns:
a new
Gtk.Menu
populated with a list of favorites, orNone
if there are no favorites.- Return type:
Generates a
Gtk.Menu
widget 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.FavoriteInfo
orNone
if one was not found. This is owned by the favorites manager and should not be freed.- Return type:
Looks for an
XApp.FavoriteInfo
that 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.FavoriteInfo
orNone
if one was not found. This is owned by the favorites manager and should not be freed.- Return type:
Looks for an
XApp.FavoriteInfo
that 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.