Functions

desktop_get_media_key_string (type)

desktop_prepend_terminal_to_vector (argc, argv)

desktop_thumbnail_cache_check_permissions (factory, quick)

desktop_thumbnail_cache_fix_permissions ()

desktop_thumbnail_has_uri (pixbuf, uri)

desktop_thumbnail_is_valid (pixbuf, uri, mtime)

desktop_thumbnail_md5 (uri)

desktop_thumbnail_path_for_uri (uri, size)

desktop_thumbnail_scale_down_pixbuf (pixbuf, dest_width, dest_height)

installer_check_for_packages (packages, callback, *user_data)

installer_install_packages (packages, callback, *user_data)

rr_error_quark ()

Details

CinnamonDesktop.desktop_get_media_key_string(type)
Parameters:

type (int) – The CDesktopEnums.MediaKeyType

Returns:

the string corresponding to the provided media key type or None

Return type:

str

Returns the Gio.Settings key string of the given media key type.

CinnamonDesktop.desktop_prepend_terminal_to_vector(argc, argv)
Parameters:
  • argc (int) – a pointer to the vector size

  • argv (str) – a pointer to the vector

Prepends a terminal (either the one configured as default in the user’s GNOME setup, or one of the common xterm emulators) to the passed in vector, modifying it in the process. The vector should be allocated with GLib.malloc, as this will GLib.free the original vector. Also all elements must have been allocated separately. That is the standard glib/GNOME way of doing vectors however. If the integer that argc points to is negative, the size will first be computed. Also note that passing in pointers to a vector that is empty, will just create a new vector for you.

CinnamonDesktop.desktop_thumbnail_cache_check_permissions(factory, quick)
Parameters:
Return type:

bool

CinnamonDesktop.desktop_thumbnail_cache_fix_permissions()
CinnamonDesktop.desktop_thumbnail_has_uri(pixbuf, uri)
Parameters:
Returns:

True if the thumbnail is for uri

Return type:

bool

Returns whether the thumbnail has the correct uri embedded in the Thumb::URI option in the png.

New in version 2.2.

CinnamonDesktop.desktop_thumbnail_is_valid(pixbuf, uri, mtime)
Parameters:
Returns:

True if the thumbnail has the right uri and mtime

Return type:

bool

Returns whether the thumbnail has the correct uri and mtime embedded in the png options.

New in version 2.2.

CinnamonDesktop.desktop_thumbnail_md5(uri)
Parameters:

uri (str) – an uri

Returns:

A string with the MD5 digest of the uri string.

Return type:

str

Calculates the MD5 checksum of the uri. This can be useful if you want to manually handle thumbnail files.

New in version 2.2.

Deprecated since version 2.22: Use GLib.Checksum instead

CinnamonDesktop.desktop_thumbnail_path_for_uri(uri, size)
Parameters:
Returns:

an absolute filename

Return type:

str

Returns the filename that a thumbnail of size size for uri would have.

New in version 2.2.

CinnamonDesktop.desktop_thumbnail_scale_down_pixbuf(pixbuf, dest_width, dest_height)
Parameters:
Returns:

a scaled pixbuf

Return type:

GdkPixbuf.Pixbuf

Scales the pixbuf to the desired size. This function is a lot faster than gdk-pixbuf when scaling down by large amounts.

New in version 2.2.

CinnamonDesktop.installer_check_for_packages(packages, callback, *user_data)
Parameters:

Uses packagekit to check if provided package names are installed.

CinnamonDesktop.installer_install_packages(packages, callback, *user_data)
Parameters:

Uses packagekit to install the provided list of packages.

CinnamonDesktop.rr_error_quark()
Returns:

a #GQuark used to identify errors coming from the GnomeRR API.

Return type:

int

Returns the #GQuark that will be used for GLib.Error values returned by the GnomeRR API.