deluge.ui.gtkui.common

Common functions for various parts of gtkui to use.

Associates magnet links to Deluge.

Parameter:overwrite (bool) – if this is True, the current setting will be overwritten
Returns:True if association was set
Return type:bool
deluge.ui.gtkui.common.build_menu_radio_list(value_list, callback, pref_value=None, suffix=None, show_notset=False, notset_label=None, notset_lessthan=0, show_other=False, show_activated=False, activated_label=None)
deluge.ui.gtkui.common.get_deluge_icon()
Returns the deluge icon for use in setting a dialogs icon. It will first attempt to get the icon from the theme and will fallback to using an image that is distributed with the package.
Returns a deluge logo pixbuf based on the size parameter.
deluge.ui.gtkui.common.reparent_iter(treestore, itr, parent, move_siblings=False)

This effectively moves itr plus it’s children to be a child of parent in treestore

Parameters:
  • treestore – gtkTreeStore, the treestore
  • itr – gtkTreeIter, the iter to move
  • parent – gtkTreeIter, the new parent for itr
  • move_siblings – bool. if True, it will move all itr’s siblings to parent
deluge.ui.gtkui.common.show_other_dialog(header, type_str, image_stockid=None, image_filename=None, default=0)

Shows a dialog with header as the header text and type_str as the type text. The type of spinbutton (int or float) is determined by default type.

Parameters:
  • header – str, the header label text
  • type_str – str, the type label text, what comes after the spinbutton
  • image_stockid – gtkStockId, the stock id of the image in the header
  • image_filename – str, filename of icon in pixmaps folder
  • default – the default value in the spinbutton
Returns:

None, int or float from spinbutton depending on default. None is returned if the user clicks on Cancel.

Return type:

None, int or float

Raises TypeError:
 

if default is not of type int or float

Previous topic

deluge.ui.gtkui.addtorrentdialog

Next topic

deluge.ui.gtkui.connectionmanager

This Page