Check-in [964bb06ce1]
Overview
Comment: | Moved load_theme() into uikit. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
964bb06ce11de4235aa51994ac02a20e |
User & Date: | mario on 2015-03-31 19:24:10 |
Other Links: | manifest | tags |
Context
2015-03-31
| ||
19:25 | Made RadioTray fallback `play` available as option instead of bookmarking. check-in: b8fcd3c3e0 user: mario tags: trunk | |
19:24 | Moved load_theme() into uikit. check-in: 964bb06ce1 user: mario tags: trunk | |
16:23 | Example for embedding PNG resource in plugin meta data (favicon for notebook tabs). check-in: 04f6353b54 user: mario tags: trunk | |
Changes
Modified st2.py from [1a108a0e92] to [df1a1ff19b].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - + | # category: sound # depends: pygtk | gi, threading, requests, pyquery, lxml # id: streamtuner2 # pack: *.py, gtk*.xml, st2.py=/usr/bin/streamtuner2, channels/__init__.py, bundle/*.py, # streamtuner2.desktop=/usr/share/applications/, README=/usr/share/doc/streamtuner2/, # NEWS.gz=/usr/share/doc/streamtuner2/changelog.gz, help/streamtuner2.1=/usr/share/man/man1/, # help/*page=/usr/share/doc/streamtuner2/help/, help/img/*=/usr/share/doc/streamtuner2/help/img/, |
︙ | |||
91 92 93 94 95 96 97 | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | - + | current_channel = "bookmarks" # currently selected channel name (as index in self.channels{}) # constructor def __init__(self): # Load stylesheet, instantiate GtkBuilder in self, menu and logo hooks |
︙ | |||
453 454 455 456 457 458 459 | 453 454 455 456 457 458 459 460 461 462 463 464 465 466 | - - - - - - - - - - | # object vars channelopts = {} #dict([(id, {"current":self.channels[id].current}) for id in self.channel_names]) for id in self.channels.keys(): if (self.channels[id]): channelopts[id] = {"current":self.channels[id].current} conf.save("state", channelopts, nice=1) |
︙ |
Modified uikit.py from [a2be3b7a05] to [cbea8fe804].
︙ | |||
436 437 438 439 440 441 442 443 444 445 446 447 448 449 | 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | + + + + + + + + + + + | # gtk.messagebox @staticmethod def msg(text, style=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_CLOSE): m = gtk.MessageDialog(None, 0, style, buttons, message_format=text) m.show() m.connect("response", lambda *w: m.destroy()) # apply gtkrc stylesheet @staticmethod def load_theme(theme=None): if theme: for dir in (conf.dir, conf.share, "/usr/share"): f = dir + "/themes/" + theme + "/gtk-2.0/gtkrc" if os.path.exists(f): gtk.rc_parse(f) pass # Pixbug loader (from inline string, as in `logo.png`) @staticmethod def pixbuf(buf, fmt="png"): p = GdkPixbuf.PixbufLoader(fmt) try: # inline encoding buf = base64.b64decode(buf) |
︙ |