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

⌈⌋ branch:  streamtuner2


Check-in [83f54d5ffd]

Overview
Comment:failed attempt to make config tables resizeable
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:83f54d5ffd5c8f43db4ab6d6c60cecc49bb3d27a
User & Date: mario on 2017-01-09 16:04:28
Other Links: manifest | tags
Context
2017-01-22
16:42
Use sys.encoding for os.system calls on Windows check-in: 5e6408e8c5 user: Oliver tags: trunk
2017-01-09
16:04
failed attempt to make config tables resizeable check-in: 83f54d5ffd user: mario tags: trunk
2017-01-08
13:38
timer: Test for .queue() result before setting statusbar := "Timer saved" check-in: 5b7a717f18 user: mario tags: trunk
Changes

Modified uikit.py from [c3a8703c77] to [12f5bb606e].

515
516
517
518
519
520
521



522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
    def config_treeview(opt, columns=["Icon", "Command"]):
        lno = len(columns)
        if lno == 2:
            liststore = gtk.ListStore(str, str, str)
        else:
            liststore = gtk.ListStore(*[str for i in range(0, lno)])
        w = gtk.TreeView(liststore)



        # two text columns and renderers
        for i in range(0, lno):
            c = gtk.TreeViewColumn(columns[i])
            c.set_resizable(True)
            c.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
            c.set_fixed_width(int(430/lno))
            r = gtk.CellRendererText()
            c.pack_end(r, expand=True)
            r.set_property("editable", True)
            r.connect("edited", uikit.liststore_edit, (liststore, i))
            c.add_attribute(r, "text", i)
            #c.add_attribute(r, "editable", 2)
            w.append_column(c)
        # add pixbuf holder to last column
        if lno < 3:
            r = gtk.CellRendererPixbuf()
            c.pack_start(r, expand=False)
            c.add_attribute(r, "stock_id", 2)
        w.set_property("width_request", 450)
        w.set_property("height_request", 115)
        return w, liststore
        
    # Generic Gtk callback to update ListStore when entries get edited.
    # where user_data = (liststore, column #id)
    @staticmethod
    def liststore_edit(cell, row, text, user_data):
        #log.EDIT(cell, row, text, user_data)
        row = int(row)







>
>
>





|












|

|







515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
    def config_treeview(opt, columns=["Icon", "Command"]):
        lno = len(columns)
        if lno == 2:
            liststore = gtk.ListStore(str, str, str)
        else:
            liststore = gtk.ListStore(*[str for i in range(0, lno)])
        w = gtk.TreeView(liststore)
        sw = gtk.ScrolledWindow()
        sw.set_border_width(5)
        sw.add(w)
        # two text columns and renderers
        for i in range(0, lno):
            c = gtk.TreeViewColumn(columns[i])
            c.set_resizable(True)
            c.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
            c.set_fixed_width(int(550/lno))
            r = gtk.CellRendererText()
            c.pack_end(r, expand=True)
            r.set_property("editable", True)
            r.connect("edited", uikit.liststore_edit, (liststore, i))
            c.add_attribute(r, "text", i)
            #c.add_attribute(r, "editable", 2)
            w.append_column(c)
        # add pixbuf holder to last column
        if lno < 3:
            r = gtk.CellRendererPixbuf()
            c.pack_start(r, expand=False)
            c.add_attribute(r, "stock_id", 2)
        w.set_property("width_request", 470)
        w.set_property("height_request", 115)
        return sw, liststore
        
    # Generic Gtk callback to update ListStore when entries get edited.
    # where user_data = (liststore, column #id)
    @staticmethod
    def liststore_edit(cell, row, text, user_data):
        #log.EDIT(cell, row, text, user_data)
        row = int(row)