def create_plugin (app):

    if not hasattr (app, "window_widget"):
        return
    
    file_menu = gtkutil.find_widget (app.window_widget, "file_menu")
    assert file_menu is not None
    
    copy_cd = CopyCD (app)
    
    mni = gtk.MenuItem ("Copy Audio-CD...")
    mni.connect ("activate", copy_cd.on_activate)
    mni.show ()
    
    file_menu.prepend (mni)
    
    return copy_cd
def create_plugin(app):
    if not hasattr(app, "window_widget"):
        return

    window = app.window_widget
    theme = gtk.icon_theme_get_default()
    rhyt = gtk.ImageMenuItem(_("Open Rhythmbox Playlist..."))

    if theme.has_icon("rhythmbox"):
        img = gtk.image_new_from_icon_name("rhythmbox", gtk.ICON_SIZE_MENU)
        img.show()
        rhyt.set_image(img)

    rhyt.show()
    listener = RhythmboxListener(app)
    rhyt.connect("activate", listener.on_clicked)

    file_menu = gtkutil.find_widget(window, "file_menu")
    file_menu.add(rhyt)
    file_menu.reorder_child(rhyt, 4)
def create_plugin (app):
    if not hasattr (app, "window_widget"):
        return
    
    window = app.window_widget
    theme = gtk.icon_theme_get_default ()
    rhyt = gtk.ImageMenuItem (_("Open Rhythmbox Playlist..."))

    if theme.has_icon("rhythmbox"):
        img = gtk.image_new_from_icon_name("rhythmbox", gtk.ICON_SIZE_MENU)
        img.show ()
        rhyt.set_image (img)

    rhyt.show ()
    listener = RhythmboxListener (app)
    rhyt.connect ("activate", listener.on_clicked)
    
    file_menu = gtkutil.find_widget (window, "file_menu")
    file_menu.add (rhyt)
    file_menu.reorder_child (rhyt, 4)