Functions¶
special_atom_get (atom) |
|
util_activate_ui (action, arg) |
|
util_activate_ui_sync (action, arg) |
|
util_compute_checksum (image) |
|
util_confirm_dialog (parent, action, msg) |
|
util_empty_history (parent_window, client, settings, history) |
|
util_empty_with_confirmation (client, settings, history) |
|
util_empty_with_confirmation_sync (client, settings, history) |
|
util_ensure_history_dir_exists (settings) |
|
util_get_dbus_au_result (variant, len) |
|
util_get_dbus_item_result (variant) |
|
util_get_dbus_items_result (variant) |
|
util_get_history_dir () |
|
util_get_history_dir_path () |
|
util_get_history_file (name, extension) |
|
util_get_history_file_path (name, extension) |
|
util_has_gnome_shell () |
|
util_read_pid_file (component) |
|
util_replace (text, pattern, substitution) |
|
util_show_win (application) |
|
util_spawn (app) |
|
util_spawn_sync (app) |
|
util_write_pid_file (component) |
|
util_xml_decode (text) |
|
util_xml_encode (text) |
Details¶
-
GPaste.
special_atom_get
(atom)¶ Parameters: atom ( GPaste.SpecialAtom
) – the atom we want to getReturns: the atom corresponding to atom Return type: Gdk.Atom
Find special atoms handled by GPaste
-
GPaste.
util_activate_ui
(action, arg)¶ Parameters: - action (
str
) – the action to activate - arg (
GLib.Variant
orNone
) – the action argument
Activate an action on a GPaste app
- action (
-
GPaste.
util_activate_ui_sync
(action, arg)¶ Parameters: - action (
str
) – the action to activate - arg (
GLib.Variant
orNone
) – the action argument
Raises: Returns: whether the action was successful
Return type: activate an action from GPaste Ui
- action (
-
GPaste.
util_compute_checksum
(image)¶ Parameters: image ( GdkPixbuf.Pixbuf
) – theGdkPixbuf.Pixbuf
to checksumReturns: the newly allocated checksum Return type: str
Compute the checksum of an image
-
GPaste.
util_confirm_dialog
(parent, action, msg)¶ Parameters: - parent (
Gtk.Window
orNone
) – the parentGtk.Window
- action (
str
) – - msg (
str
) – the message to display
Return type: Show GPaste about dialog
- parent (
-
GPaste.
util_empty_history
(parent_window, client, settings, history)¶ Parameters: - parent_window (
Gtk.Window
orNone
) – the parentGtk.Window
- client (
GPaste.Client
) – aGPaste.Client
instance - settings (
GPaste.Settings
) – aGPaste.Settings
instance - history (
str
) – the name of the history to empty
Empty history after prompting user for confirmation
- parent_window (
-
GPaste.
util_empty_with_confirmation
(client, settings, history)¶ Parameters: - client (
GPaste.Client
) – aGPaste.Client
instance - settings (
GPaste.Settings
) – aGPaste.Settings
instance - history (
str
) – the name of the history to empty
Empty an history after confirmation. Confirmation is skipped if GPaste is configured to do so.
- client (
-
GPaste.
util_empty_with_confirmation_sync
(client, settings, history)¶ Parameters: - client (
GPaste.Client
) – aGPaste.Client
instance - settings (
GPaste.Settings
) – aGPaste.Settings
instance - history (
str
) – the name of the history to empty
Raises: Returns: whether the action was successful
Return type: Empty an history after confirmation. Confirmation is skipped if GPaste is configured to do so.
- client (
-
GPaste.
util_ensure_history_dir_exists
(settings)¶ Parameters: settings ( GPaste.Settings
) – aGPaste.Settings
instanceReturns: where it exists or if there was an error creating it Return type: bool
Ensure the history dir exists
-
GPaste.
util_get_dbus_au_result
(variant, len)¶ Parameters: - variant (
GLib.Variant
) – - len (
int
) –
Return type: - variant (
-
GPaste.
util_get_dbus_item_result
(variant)¶ Parameters: variant ( GLib.Variant
) – aGLib.Variant
Returns: The item Return type: GPaste.ClientItem
Get the “(ss)”
GLib.Variant
as an item
-
GPaste.
util_get_dbus_items_result
(variant)¶ Parameters: variant ( GLib.Variant
) – aGLib.Variant
Returns: The items Return type: [ GPaste.ClientItem
]Get the “a(ss)”
GLib.Variant
as a list of items
-
GPaste.
util_get_history_dir
()¶ Returns: the directory Return type: Gio.File
Get the directory where we store the history
-
GPaste.
util_get_history_dir_path
()¶ Returns: the directory path Return type: str
Get the path to the directory where we store the history
-
GPaste.
util_get_history_file
(name, extension)¶ Parameters: Returns: the file
Return type: Get the file in which we store the history
-
GPaste.
util_get_history_file_path
(name, extension)¶ Parameters: Returns: the file path
Return type: Get the path to the file in which we store the history
-
GPaste.
util_has_gnome_shell
()¶ Returns: True
if gnome-shell is installedReturn type: bool
Check whether gnome-shell is installed or not
-
GPaste.
util_read_pid_file
(component)¶ Parameters: component ( str
) – The component we’re handlingReturns: the pid Return type: int
Read the pid file
-
GPaste.
util_replace
(text, pattern, substitution)¶ Parameters: Return type:
-
GPaste.
util_show_win
(application)¶ Parameters: application ( Gio.Application
) – aGtk.Application
Present the application’s window to user
-
GPaste.
util_spawn_sync
(app)¶ Parameters: app ( str
) – the GPaste app to spawnRaises: GLib.Error
Returns: whether the spawn was successful Return type: bool
spawn a GPaste app
-
GPaste.
util_write_pid_file
(component)¶ Parameters: component ( str
) – The component we’re handlingWrite the pid file