コード例 #1
0
def pkg_channel(pkg, pkg_info, key):
    name = rcd_util.get_package_channel_name(pkg)
    if not name or name == "????": # evil magic failure code
        return None
    icon = rcd_util.get_package_channel_icon(pkg, width=24, height=24)
    box = gtk.HBox(0, 2)
    if icon:
        img = gtk.Image()
        img.set_from_pixbuf(icon)
        box.pack_start(img, 0, 0)
    label = gtk.Label(name)
    box.pack_start(label, 0, 0)
    return box
コード例 #2
0
def pkg_ch_name(pkg):
    return rcd_util.get_package_channel_name(pkg)
コード例 #3
0
def sort_pkgs_by_channel(a, b):
    return cmp(rcd_util.get_package_channel_name(a),
               rcd_util.get_package_channel_name(b))