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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [cbec1b81a6]

Overview
Comment:Add notebook tabs for recordflags plugin. Instead of filtering them, distribute options into notebook tabs "_cfg", "_extra", or "_verbose".
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: cbec1b81a6d6520f794d9199f84d251d32e2d393
User & Date: mario on 2017-02-21 23:22:51
Other Links: manifest | tags
Context
2017-02-21
23:48
Remove verbose config: option, reclassify some record tool options. check-in: 7777a863d7 user: mario tags: trunk
23:22
Add notebook tabs for recordflags plugin. Instead of filtering them, distribute options into notebook tabs "_cfg", "_extra", or "_verbose". check-in: cbec1b81a6 user: mario tags: trunk
23:21
Rename `_add` to `_pack`. Support opt= parameter to allow said `pack_*` function to operate on option flags (e.g. `category:` to target widget). check-in: 417fcfdbd5 user: mario tags: trunk
Changes

Modified contrib/recordflags.py from [f5a34b10ec] to [ea23c9bd67].

175
176
177
178
179
180
181

182




183
184
185
186
187
188
189
        parent.recordoptions_save.connect("clicked", self.save_only)
        parent.recordoptions_eventbox.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color("#442211"))

        # shortcuts
        self.add_plg = parent.configwin.add_plg           # create _cfg widgets
        self.load_config = parent.configwin.load_config   # populate _cfg widgets
        self.save_config = parent.configwin.save_config   # save from _cfg widgets

        self.recordoptions_cfg = parent.recordoptions_cfg # our vbox widget




        
    # prepares a few shortcuts
    def map_app_args(self, app):
        config = self.flag_meta[app]["config"]
        self.argmap = { row["arg"].split(" ")[0]: row["name"] for row in config if row.get("arg") }
        self.namemap = dict(zip(self.argmap.values(), self.argmap.keys()))
        self.typemap = { row["name"]: row["type"] for row in config if row.get("type") }







>
|
>
>
>
>







175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
        parent.recordoptions_save.connect("clicked", self.save_only)
        parent.recordoptions_eventbox.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color("#442211"))

        # shortcuts
        self.add_plg = parent.configwin.add_plg           # create _cfg widgets
        self.load_config = parent.configwin.load_config   # populate _cfg widgets
        self.save_config = parent.configwin.save_config   # save from _cfg widgets
        self.cfg_vbox = { 
            "basic": self.parent.recordoptions_cfg,
            "extra": self.parent.recordoptions_cfg_extra,
            "verbose": self.parent.recordoptions_cfg_verbose,
        }

        
    # prepares a few shortcuts
    def map_app_args(self, app):
        config = self.flag_meta[app]["config"]
        self.argmap = { row["arg"].split(" ")[0]: row["name"] for row in config if row.get("arg") }
        self.namemap = dict(zip(self.argmap.values(), self.argmap.keys()))
        self.typemap = { row["name"]: row["type"] for row in config if row.get("type") }
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276

277
278
279
280
281
282
283
284
        # show window
        p.win_recordoptions.show()


    # populate config widgets, seth defaults/current settings
    def load_config_widgets(self, row, group="streamripper", p=None):
        # clean up previous
        [self.recordoptions_cfg.remove(w) for w in self.recordoptions_cfg.get_children()]
        # add plugins
        self.add_plg(group, self.filter_options(self.flag_meta[group]), self.add_flag, self.cfg_widget_pfx)
        # set values
        self.load_config(self.configdict_from_args(row), self.cfg_widget_pfx, widgets=self.widgets)

    # clean up options according to each {category:} and `recordflags_extra`
    def filter_options(self, meta):
        meta = copy.copy(meta)
        filter = ["basic", conf.recordflags_extra, None, {"verbose":"extra"}.get(conf.recordflags_extra)]
        log.CONF(filter)
        meta["config"] = [desc for desc in meta["config"] if desc.get("category") in filter]
        return meta

    # Put config widgets into recordoptions_cfg vbox
    def add_flag(self, id=None, w=None, label=None, color=None, image=None, align=5):

        self.parent.recordoptions_cfg.pack_start(uikit.wrap(self.widgets, id, w, label, color, image, align, label_markup=1, label_size=250))

        
    # return "--args str" for current config widget states
    def args_from_configwin(self):
        cfg = { name: None for name in self.namemap.keys() }
        self.save_config(cfg, self.cfg_widget_pfx, widgets=self.widgets)
        log.DATA(cfg)







|

|



<
<
<
<
<
<
<
<
|
|
>
|







259
260
261
262
263
264
265
266
267
268
269
270
271








272
273
274
275
276
277
278
279
280
281
282
        # show window
        p.win_recordoptions.show()


    # populate config widgets, seth defaults/current settings
    def load_config_widgets(self, row, group="streamripper", p=None):
        # clean up previous
        [vbox.remove(w) for vbox in self.cfg_vbox.values() for w in vbox.get_children()]
        # add plugins
        self.add_plg(group, self.flag_meta[group], self.pack_option, self.cfg_widget_pfx)
        # set values
        self.load_config(self.configdict_from_args(row), self.cfg_widget_pfx, widgets=self.widgets)









    # Put config widgets into recordoptions_cfg_*** vbox
    def pack_option(self, id=None, w=None, label=None, color=None, image=None, align=5, opt={}):
        vbox = self.cfg_vbox.get(opt.get("category"), self.cfg_vbox["basic"])
        vbox.pack_start(uikit.wrap(self.widgets, id, w, label, color, image, align, label_markup=1, label_size=250))

        
    # return "--args str" for current config widget states
    def args_from_configwin(self):
        cfg = { name: None for name in self.namemap.keys() }
        self.save_config(cfg, self.cfg_widget_pfx, widgets=self.widgets)
        log.DATA(cfg)

Modified gtk3.xml.gz from [d613c400aa] to [84acc45f88].

cannot compute difference between binary files