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

⌈⌋ ⎇ branch:  streamtuner2


Diff

Differences From Artifact [42b5afa6c8]:

To Artifact [23eda88d68]:


162
163
164
165
166
167
168
169

170
171
172
173
174
175
176
177
178
179
180
181
182
                unicode: "",
                bool: False,
                int: 0,
                gtk.gdk.Pixbuf: empty_pixbuf
            }
            if gtk.gdk.Pixbuf in vartypes:
                pix_entry = vartypes.index(gtk.gdk.Pixbuf) 
            

            # sort data into gtk liststore array
            for row in entries:

                # preset some values if absent
                row.setdefault("deleted", False)
                row.setdefault("search_col", "#ffffff")
                row.setdefault("search_set", False)

                # generate ordered list from dictionary, using rowmap association
                row = [   row.get( skey , defaults[vartypes[i]] )   for i,skey   in enumerate(rowmap)   ]

                # map Python2 unicode to str
                row = [ str(value) if type(value) is unicode else value  for value in row ]







|
>





|







162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
                unicode: "",
                bool: False,
                int: 0,
                gtk.gdk.Pixbuf: empty_pixbuf
            }
            if gtk.gdk.Pixbuf in vartypes:
                pix_entry = vartypes.index(gtk.gdk.Pixbuf) 

            normal_bg = uikit.get_bg_color(widget)
            # sort data into gtk liststore array
            for row in entries:

                # preset some values if absent
                row.setdefault("deleted", False)
                row.setdefault("search_col", normal_bg) #ffffff
                row.setdefault("search_set", False)

                # generate ordered list from dictionary, using rowmap association
                row = [   row.get( skey , defaults[vartypes[i]] )   for i,skey   in enumerate(rowmap)   ]

                # map Python2 unicode to str
                row = [ str(value) if type(value) is unicode else value  for value in row ]
205
206
207
208
209
210
211










212
213
214
215
216
217
218
            # apply array to widget
            widget.set_model(ls)
            return ls, rowmap, pix_entry
            
        pass














    #-- treeview for categories
    #
    # simple two-level treeview display in one column
    # with entries = [main,[sub,sub], title,[...],...]
    #







>
>
>
>
>
>
>
>
>
>







206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
            # apply array to widget
            widget.set_model(ls)
            return ls, rowmap, pix_entry
            
        pass


    # figure out standard background
    @staticmethod
    def get_bg_color(widget):
        try:
            # Gtk3 only
            normal_bg = widget.get_style_context().get_background_color(gtk.StateType.NORMAL)
            normal_bg = normal_bg.to_string()
        except:
            normal_bg = "#ffffff"  # Gtk2 default
        return normal_bg


    #-- treeview for categories
    #
    # simple two-level treeview display in one column
    # with entries = [main,[sub,sub], title,[...],...]
    #