CoverArt Browser  v2.0
Browse your cover-art albums in Rhythmbox
coverart_rb3compat.Menu Class Reference

List of all members.

Public Member Functions

def __init__
def add_menu_item
def insert_menu_item
def insert_separator
def remove_menu_items
def load_from_file
def connect_signals
def get_gtkmenu
def get_menu_object
def set_sensitive
def popup

Public Attributes

 plugin
 shell
 builder
 ui_filename

Detailed Description

Menu object used to create window popup menus

Definition at line 174 of file coverart_rb3compat.py.


Constructor & Destructor Documentation

def coverart_rb3compat.Menu.__init__ (   self,
  plugin,
  shell 
)
Initializes the menu.

Definition at line 182 of file coverart_rb3compat.py.


Member Function Documentation

def coverart_rb3compat.Menu.add_menu_item (   self,
  menubar,
  section_name,
  action 
)
add a new menu item to the popup
:param menubar: `str` is the name GtkMenu (or ignored for RB2.99+)
:param section_name: `str` is the name of the section to add the item to (RB2.99+)
:param action: `Action`  to associate with the menu item

Definition at line 194 of file coverart_rb3compat.py.

def coverart_rb3compat.Menu.connect_signals (   self,
  signals 
)
connect all signal handlers with their menuitem counterparts
:param signals: `dict` key is the name of the menuitem 
     and value is the function callback when the menu is activated

Definition at line 333 of file coverart_rb3compat.py.

def coverart_rb3compat.Menu.get_gtkmenu (   self,
  source,
  popup_name 
)
utility function to obtain the GtkMenu from the menu UI file
:param popup_name: `str` is the name menu-id in the UI file

Definition at line 344 of file coverart_rb3compat.py.

def coverart_rb3compat.Menu.get_menu_object (   self,
  menu_name_or_link 
)
utility function returns the GtkMenuItem/Gio.MenuItem
:param menu_name_or_link: `str` to search for in the UI file

Definition at line 365 of file coverart_rb3compat.py.

def coverart_rb3compat.Menu.insert_menu_item (   self,
  menubar,
  section_name,
  position,
  action 
)
add a new menu item to the popup
:param menubar: `str` is the name GtkMenu (or ignored for RB2.99+)
:param section_name: `str` is the name of the section to add the item to (RB2.99+)
:param position: `int` position to add to GtkMenu (ignored for RB2.99+)
:param action: `Action`  to associate with the menu item

Definition at line 203 of file coverart_rb3compat.py.

def coverart_rb3compat.Menu.insert_separator (   self,
  menubar,
  at_position 
)
add a separator to the popup (only required for RB2.98 and earlier)
:param menubar: `str` is the name GtkMenu (or ignored for RB2.99+)
:param position: `int` position to add to GtkMenu (ignored for RB2.99+)

Definition at line 240 of file coverart_rb3compat.py.

def coverart_rb3compat.Menu.load_from_file (   self,
  rb2_ui_filename,
  rb3_ui_filename 
)
utility function to load the menu structure
:param rb2_ui_filename: `str` RB2.98 and below UI file
:param rb3_ui_filename: `str` RB2.99 and higher UI file

Definition at line 289 of file coverart_rb3compat.py.

def coverart_rb3compat.Menu.popup (   self,
  source,
  menu_name,
  button,
  time 
)
utility function to show the popup menu

Definition at line 401 of file coverart_rb3compat.py.

def coverart_rb3compat.Menu.remove_menu_items (   self,
  menubar,
  section_name 
)
utility function to remove all menuitems associated with the menu section
:param menubar: `str` is the name of the GtkMenu containing the menu items (ignored for RB2.99+)
:param section_name: `str` is the name of the section containing the menu items (for RB2.99+ only)

Definition at line 257 of file coverart_rb3compat.py.

def coverart_rb3compat.Menu.set_sensitive (   self,
  menu_or_action_item,
  enable 
)
utility function to enable/disable a menu-item
:param menu_or_action_item: `GtkMenuItem` or `Gio.SimpleAction`
   that is to be enabled/disabled
:param enable: `bool` value to enable/disable

Definition at line 386 of file coverart_rb3compat.py.


The documentation for this class was generated from the following file:
 All Classes Functions