Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ ⎇ branch:  streamtuner2


Diff

Differences From Artifact [88cac9ca23]:

To Artifact [d93cf9191f]:


42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
if ver==3:
    from gi import pygtkcompat as pygtk
    pygtk.enable() 
    pygtk.enable_gtk(version='3.0')
    from gi.repository import Gtk as gtk
    from gi.repository import GObject as gobject
    from gi.repository import GdkPixbuf
    #empty_pixbuf =  GdkPixbuf.Pixbuf.new(GdkPixbuf.Colorspace.RGB, True, 8, 16, 16)#, 4, None, None)
    empty_pixbuf =  GdkPixbuf.Pixbuf.new_from_data(b"\xFF\xFF\xFF\xFF", GdkPixbuf.Colorspace.RGB, True, 8, 1, 1, 4, None, None)
    __print__(dbg.STAT, gtk)
    __print__(dbg.STAT, gobject)
else:
    import pygtk
    import gtk
    import gobject
    GdkPixbuf = gtk.gdk
    empty_pixbuf = GdkPixbuf.Pixbuf(gtk.gdk.COLORSPACE_RGB,True,8,16,16)
    #print empty_pixbuf.get_has_alpha()
    #empty_pixbuf.fill(0xFFFFFFFF)

# prepare gtkbuilder data
ui_xml = get_data("gtk3.xml.gz", decode=True, gz=True) #or get_data("gtk3.xml", decode=True)
if ver == 2:
    ui_xml = ui_xml.replace('version="3.0"', 'version="2.16"')



# simplified gtk constructors               ---------------------------------------------
class uikit:


         







<
<







<
<
<





<







42
43
44
45
46
47
48


49
50
51
52
53
54
55



56
57
58
59
60

61
62
63
64
65
66
67
if ver==3:
    from gi import pygtkcompat as pygtk
    pygtk.enable() 
    pygtk.enable_gtk(version='3.0')
    from gi.repository import Gtk as gtk
    from gi.repository import GObject as gobject
    from gi.repository import GdkPixbuf


    __print__(dbg.STAT, gtk)
    __print__(dbg.STAT, gobject)
else:
    import pygtk
    import gtk
    import gobject
    GdkPixbuf = gtk.gdk




# prepare gtkbuilder data
ui_xml = get_data("gtk3.xml.gz", decode=True, gz=True) #or get_data("gtk3.xml", decode=True)
if ver == 2:
    ui_xml = ui_xml.replace('version="3.0"', 'version="2.16"')



# simplified gtk constructors               ---------------------------------------------
class uikit:


         
508
509
510
511
512
513
514
515






516
517
518
519
520
521
522
            buf = gzip_decode(buf)
        if buf:
            p.write(buf)
        pix = p.get_pixbuf()
        p.close()
        return pix
            
            








# Text-only dropdown list.
#
# Necessary because gtk.ComboBoxText binding is absent in debian packages
# https://bugzilla.gnome.org/show_bug.cgi?id=660659
#







|
>
>
>
>
>
>







502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
            buf = gzip_decode(buf)
        if buf:
            p.write(buf)
        pix = p.get_pixbuf()
        p.close()
        return pix
            

# Transparent png            
empty_pixbuf = uikit.pixbuf(
    """iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAA
    B6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUU
    H3wQLEAE6zgxuGAAAABFJREFUOBFjGAWjYBSMAigAAAQQAAFWMn04AAAAAElFTkSuQmCC"""
)


# Text-only dropdown list.
#
# Necessary because gtk.ComboBoxText binding is absent in debian packages
# https://bugzilla.gnome.org/show_bug.cgi?id=660659
#