Check-in [d34fb69dda]
Overview
Comment: | add hooks{} support |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
d34fb69dda7d064f24117257489ab9f9 |
User & Date: | mario on 2014-05-19 19:26:38 |
Other Links: | manifest | tags |
Context
2014-05-19
| ||
19:27 | update config dialog check-in: 9d4259a324 user: mario tags: trunk | |
19:26 | add hooks{} support check-in: d34fb69dda user: mario tags: trunk | |
2014-05-15
| ||
20:07 | Better probe for None and empty "" string in titles or urls check-in: 9bfbde8091 user: mario tags: trunk | |
Changes
Modified st2.py from [95ed169041] to [ed4fb66de3].
︙ | |||
105 106 107 108 109 110 111 112 113 114 115 116 117 118 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | + + + | # object containers widgets = {} # non-glade widgets (the manually instantiated ones) channels = {} # channel modules features = {} # non-channel plugins working = [] # threads add_signals = {} # channel gtk-handler signals hooks = { "play": [favicon.download_playing], # observers queue here } # status variables channel_names = ["bookmarks"] # order of channel notebook tabs current_channel = "bookmarks" # currently selected channel name (as index in self.channels{}) # constructor |
︙ | |||
126 127 128 129 130 131 132 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | - + | gtk.Builder.add_from_file(self, conf.find_in_dirs([".", conf.share], ui_file)), gui_startup(2/20.0) # manual gtk operations self.extensionsCTM.set_submenu(self.extensions) # duplicates Station>Extension menu into stream context menu # initialize channels self.channels = { "bookmarks": bookmarks(parent=self), # this the remaining built-in channel |
︙ | |||
306 307 308 309 310 311 312 | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | - + | # play button def on_play_clicked(self, widget, event=None, *args): row = self.row() if row: self.channel().play(row) |
︙ | |||
846 847 848 849 850 851 852 | 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 | - + | def add_plugins(self): for name,meta in channels.module_meta().items(): # add plugin load entry if name: cb = gtk.CheckButton(name) |
︙ | |||
956 957 958 959 960 961 962 | 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 | - - + | # Some feature extensions inject custom categories[] into streams{} # e.g. "search" adds its own category once activated, as does the "timer" plugin. # class bookmarks(GenericChannel): # desc |
︙ |