Check-in [b9cadd6925]
Overview
| Comment: | Rename `mygtk` to `uikit`. Move AuxiliaryWindow and About dialog from main. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
b9cadd6925d5891c6b8ed813d638a3a2 |
| User & Date: | mario on 2015-03-29 14:43:28 |
| Other Links: | manifest | tags |
Context
|
2015-03-29
| ||
| 14:44 | Move search and streamedit dialogs into plugins. Less indentation. check-in: 99f122b391 user: mario tags: trunk | |
| 14:43 | Rename `mygtk` to `uikit`. Move AuxiliaryWindow and About dialog from main. check-in: b9cadd6925 user: mario tags: trunk | |
| 14:41 | Less indentation, update pack: list. check-in: 3c07d74bb6 user: mario tags: trunk | |
Changes
Modified uikit.py from [dec662c44d] to [9c82dd0573].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 | - + | # # encoding: UTF-8 # api: python # type: functions |
| ︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + - + | # # # debug |
| ︙ | |||
61 62 63 64 65 66 67 | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - + |
ui_file = "gtk2.xml"
empty_pixbuf = gtk.gdk.pixbuf_new_from_data(b"\0\0\0\0",gtk.gdk.COLORSPACE_RGB,True,8,1,1,4)
# simplified gtk constructors ---------------------------------------------
|
| ︙ | |||
260 261 262 263 264 265 266 | 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | - + |
#-- save window size and widget properties
#
# needs a list of widgetnames
|
| ︙ | |||
540 541 542 543 544 545 546 | 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
progressbar.set_property("text", msg)
while gtk.events_pending(): gtk.main_iteration(False)
else:
progresswin.hide()
except: return
# Encapsulates references to gtk objects AND properties in main window,
# which allows to use self. and main. almost interchangably.
#
# This is a kludge to keep gtkBuilder widgets accessible; so just one
# instance has to be built. Also ties main.channels{} or .features{}
# dicts together for feature windows. Used by search, config, streamedit.
#
class AuxiliaryWindow(object):
def __init__(self, parent):
self.main = parent
self.meta = plugin_meta(None, inspect.getcomments(inspect.getmodule(self)))
def __getattr__(self, name):
if name in self.main.__dict__:
return self.main.__dict__[name]
elif name in self.main.__class__.__dict__:
return self.main.__class__.__dict__[name]
else:
return self.main.get_widget(name)
# Auxiliary window: about dialog
#
class AboutStreamtuner2(AuxiliaryWindow):
def __init__(self, parent):
a = gtk.AboutDialog()
a.set_version(parent.__version__)
a.set_name("streamtuner2")
a.set_license("Public Domain\n\nNo Strings Attached.\nUnrestricted distribution,\nmodification, use.")
a.set_authors(["Mario Salzer <http://mario.include-once.org/>\n\nConcept based on streamtuner 0."+"99."+"99 from\nJean-Yves Lefort, of which some code remains\nin the Google stations plugin.\n<http://www.nongnu.org/streamtuner/>\n\nMyOggRadio plugin based on cooperation\nwith Christian Ehm. <http://ehm-edv.de/>"])
a.set_website("http://milki.include-once.org/streamtuner2/")
a.connect("response", lambda a, ok: ( a.hide(), a.destroy() ) )
a.show()
|