Functions¶
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Details¶
- GPaste.util_activate_ui(action, arg)¶
 - Parameters:
 action (
str) – the action to activatearg (
GLib.VariantorNone) – the action argument
Activate an action on a GPaste app
- GPaste.util_activate_ui_sync(action, arg)¶
 - Parameters:
 action (
str) – the action to activatearg (
GLib.VariantorNone) – the action argument
- Raises:
 - Returns:
 whether the action was successful
- Return type:
 
activate an action from GPaste Ui
- GPaste.util_empty_with_confirmation(client, settings, history)¶
 - Parameters:
 client (
GPaste.Client) – aGPaste.Clientinstancesettings (
GPaste.Settings) – aGPaste.Settingsinstancehistory (
str) – the name of the history to empty
Empty a history after confirmation. Confirmation is skipped if GPaste is configured to do so.
- GPaste.util_empty_with_confirmation_sync(client, settings, history)¶
 - Parameters:
 client (
GPaste.Client) – aGPaste.Clientinstancesettings (
GPaste.Settings) – aGPaste.Settingsinstancehistory (
str) – the name of the history to empty
- Raises:
 - Returns:
 whether the action was successful
- Return type:
 
Empty a history after confirmation. Confirmation is skipped if GPaste is configured to do so.
- GPaste.util_ensure_history_dir_exists(settings)¶
 - Parameters:
 settings (
GPaste.Settings) – aGPaste.Settingsinstance- Returns:
 where it exists or if there was an error creating it
- Return type:
 
Ensure the history dir exists
- GPaste.util_get_dbus_au_result(variant, len)¶
 - Parameters:
 variant (
GLib.Variant) –len (
int) –
- Return type:
 
- GPaste.util_get_dbus_item_result(variant)¶
 - Parameters:
 variant (
GLib.Variant) – aGLib.Variant- Returns:
 The item
- Return type:
 
Get the “(ss)”
GLib.Variantas an item
- GPaste.util_get_dbus_items_result(variant)¶
 - Parameters:
 variant (
GLib.Variant) – aGLib.Variant- Returns:
 The items
- Return type:
 
Get the “a(ss)”
GLib.Variantas a list of items
- GPaste.util_get_history_dir()¶
 - Returns:
 the directory
- Return type:
 
Get the directory where we store the history
- GPaste.util_get_history_dir_path()¶
 - Returns:
 the directory path
- Return type:
 
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()¶
 - 
Check whether gnome-shell is installed or not
 
- GPaste.util_read_pid_file(component)¶
 - 
Read the pid file
 
- GPaste.util_replace(text, pattern, substitution)¶
 
- GPaste.util_spawn_sync(app)¶
 - Parameters:
 app (
str) – the GPaste app to spawn- Raises:
 - Returns:
 whether the spawn was successful
- Return type:
 
spawn a GPaste app
- GPaste.util_write_pid_file(component)¶
 - Parameters:
 component (
str) – The component we’re handling
Write the pid file
- GPaste.util_xml_decode(text)¶
 - 
Decode the text to its original pre-xml form