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

βŒˆβŒ‹ βŽ‡ branch:  streamtuner2


new_station.py at [a1d8b8ef7b]

File contrib/new_station.py artifact 5deb8cb3d6 part of check-in a1d8b8ef7b


# encoding: utf-8
# api: streamtuner2
# title: New station
# description: Adds menu entry to add new station
# version: 0.2
# type: feature
# category: ui
# config: -
# priority: optional
# 
# Is a trivial wrapper around streamedit, which hooks into the
# main menu as "New station..."
#

from uikit import *

# 
class new_station (object):
    plugin = "new_station"
    meta = plugin_meta()
    parent = None
    win = None

    # show stream data editing dialog
    def __init__(self, parent):
        self.parent = parent
        uikit.add_menu([parent.streammenu], "New station…", self.new, insert=3)
  
    #
    def new(self, *w):
        self.win = win = gtk.Dialog();
        t = gtk.Table(2, 3)
        win.pack_start(t)
        win.show()
        

    #
    def cancel(self, *w):
        self.parent.win_newstation.hide()

    #
    def ok(self, *w):
        self.parent.win_newstation.hide()