Check-in [a6f5f66365]
Overview
Comment: | Update window title for currently selected category tab. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
a6f5f66365635589723dffa7aaaed466 |
User & Date: | mario on 2015-04-05 14:09:31 |
Other Links: | manifest | tags |
Context
2015-04-05
| ||
14:12 | Capitalize remaining menu entries, update PNG icon to 64x64, remove examples from logo/banner template, default to size of 315ยท115 px. check-in: ce13199e0f user: mario tags: trunk | |
14:09 | Update window title for currently selected category tab. check-in: a6f5f66365 user: mario tags: trunk | |
14:09 | Wrap `gzip_decode` as fallback for Python 2. check-in: d88aab3981 user: mario tags: trunk | |
Changes
Modified st2.py from [d4a3f5a23c] to [df69d27d62].
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - + - + | # url: http://freshcode.club/projects/streamtuner2 # config: # { type: env, name: http_proxy, description: proxy for HTTP access } # { type: env, name: XDG_CONFIG_HOME, description: relocates user .config subdirectory } # category: sound # depends: pygtk | gi, threading, requests, pyquery, lxml # id: streamtuner2 |
︙ | |||
70 71 72 73 74 75 76 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | - - + | class StreamTunerTwo(gtk.Builder): # object containers widgets = {} # non-glade widgets (the manually instantiated ones) channels = {} # channel modules features = {} # non-channel plugins working = [] # threads |
︙ | |||
139 140 141 142 143 144 145 | 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | - + | self.current_channel = self.current_channel_gtk() try: self.channel().first_show() except: __print__(dbg.INIT, "main.__init__: current_channel.first_show() initialization error") # bind gtk/glade event names to functions gui_startup(19.75/20.0) |
︙ | |||
198 199 200 201 202 203 204 | 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | - + + | "search_cancel": self.search.cancel, "true": lambda w,*args: True, # win_streamedit "streamedit_open": self.streamedit.open, "streamedit_save": self.streamedit.save, "streamedit_new": self.streamedit.new, "streamedit_cancel": self.streamedit.cancel, |
︙ | |||
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | + + + + + | return self.channel_names[self.notebook_channels.get_current_page()] # Notebook tab has been clicked (receives numeric page_num), but *NOT* yet changed (visually). def channel_switch(self, notebook, page, page_num=0, *args): self.current_channel = notebook.get_menu_label_text(notebook.get_nth_page(page_num)) __print__(dbg.UI, "main.channel_switch():", "set current_channel :=", self.current_channel) self.update_title() # if first selected, load current category __print__(dbg.STAT, "TRY", "main.channel_switch(): ", self.current_channel + ".first_show()") try: self.channel().first_show() except: __print__(dbg.INIT, ".first_show() initialization error") # Invoked from the menu instead, uses module name instead of numeric tab id def channel_switch_by_name(self, name): self.notebook_channels.set_current_page(self.channel_names.index(name)) # Mirror selected channel tab into main window title def update_title(self): self.win_streamtuner2.set_title("Streamtuner2 - %s" % self.channel().meta.get("title")) # Convert ListStore iter to row number def rowno(self): (model, iter) = self.model_iter() return model.get_path(iter)[0] # Currently selected entry in stations list, return complete data dict |
︙ |