Check-in [e1d9342408]
Overview
| Comment: | Prepare specbuttons addin (small user-defined application control interface, adds to the main toolbar) |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
e1d9342408f195b66c002b68b104ecdf |
| User & Date: | mario on 2016-10-18 21:27:39 |
| Other Links: | manifest | tags |
Context
|
2016-10-18
| ||
| 21:57 | Make specbuttons smaller, lookup image names (using `locate` - should be moved to configwin saving callback, as it's slow on startup otherwise) check-in: 4767ecba93 user: mario tags: trunk | |
| 21:27 | Prepare specbuttons addin (small user-defined application control interface, adds to the main toolbar) check-in: e1d9342408 user: mario tags: trunk | |
| 21:26 | Smaller icon for housemixes plugin check-in: adb4636366 user: mario tags: trunk | |
Changes
Modified config.py from [f7bc6d9cd5] to [ff6fbbe1be].
| ︙ | ︙ | |||
119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
"video/*": self.find_player(typ="video", default="vlc"),
"url/http": self.find_player(typ="browser"),
}
self.record = {
"audio/*": self.find_player(typ="xterm") + " -e \"streamripper %srv\"", # -d /home/***USERNAME***/Musik
"video/youtube": self.find_player(typ="xterm") + " -e \"youtube-dl %srv\"",
}
# Presets are redundant now. On first startup the `priority:` field of each plugin is checked.
self.plugins = {
# core plugins, cannot be disabled anyway
"bookmarks": 1,
"search": 1,
"streamedit": 1,
"configwin": 1,
| > > > | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
"video/*": self.find_player(typ="video", default="vlc"),
"url/http": self.find_player(typ="browser"),
}
self.record = {
"audio/*": self.find_player(typ="xterm") + " -e \"streamripper %srv\"", # -d /home/***USERNAME***/Musik
"video/youtube": self.find_player(typ="xterm") + " -e \"youtube-dl %srv\"",
}
self.specbuttons = {
"gtk-media-forward": "pavucontrol",
}
# Presets are redundant now. On first startup the `priority:` field of each plugin is checked.
self.plugins = {
# core plugins, cannot be disabled anyway
"bookmarks": 1,
"search": 1,
"streamedit": 1,
"configwin": 1,
|
| ︙ | ︙ |
Modified gtk3.xml.gz from [844d533dba] to [8289f3469a].
cannot compute difference between binary files
Modified st2.py from [44d62e1137] to [0bca1b8083].
| ︙ | ︙ | |||
160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
"menu_properties": self.configwin.open,
"config_cancel": self.configwin.hide,
"config_save": self.configwin.save,
"config_play_list_edit_col0": lambda w,path,txt: (self.configwin.list_edit(self.config_play, path, 0, txt)),
"config_play_list_edit_col1": lambda w,path,txt: (self.configwin.list_edit(self.config_play, path, 1, txt)),
"config_record_list_edit_col0": lambda w,path,txt: (self.configwin.list_edit(self.config_record, path, 0, txt)),
"config_record_list_edit_col1": lambda w,path,txt: (self.configwin.list_edit(self.config_record, path, 1, txt)),
# else
"update_categories": self.update_categories,
"update_favicons": self.update_favicons,
"app_state": self.save_app_state,
"bookmark": self.bookmark,
"save_as": self.save_as,
"menu_about": lambda w: AboutStreamtuner2(self),
| > > | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
"menu_properties": self.configwin.open,
"config_cancel": self.configwin.hide,
"config_save": self.configwin.save,
"config_play_list_edit_col0": lambda w,path,txt: (self.configwin.list_edit(self.config_play, path, 0, txt)),
"config_play_list_edit_col1": lambda w,path,txt: (self.configwin.list_edit(self.config_play, path, 1, txt)),
"config_record_list_edit_col0": lambda w,path,txt: (self.configwin.list_edit(self.config_record, path, 0, txt)),
"config_record_list_edit_col1": lambda w,path,txt: (self.configwin.list_edit(self.config_record, path, 1, txt)),
"config_specbuttons_list_edit_col0": lambda w,path,txt: (self.configwin.list_edit(self.config_specbuttons, path, 0, txt)),
"config_specbuttons_list_edit_col1": lambda w,path,txt: (self.configwin.list_edit(self.config_specbuttons, path, 1, txt)),
# else
"update_categories": self.update_categories,
"update_favicons": self.update_favicons,
"app_state": self.save_app_state,
"bookmark": self.bookmark,
"save_as": self.save_as,
"menu_about": lambda w: AboutStreamtuner2(self),
|
| ︙ | ︙ | |||
193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
})
# actually display main window
if conf.window_title:
self.update_title()
self.win_streamtuner2.show_all()
gui_startup(100.0)
#-- Shortcut for glade.get_widget()
# Allows access to widgets as direct attributes instead of using .get_widget()
# Also looks in self.channels[] for the named channel plugins
def __getattr__(self, name):
if name in self.channels:
| > | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
})
# actually display main window
if conf.window_title:
self.update_title()
self.win_streamtuner2.show_all()
gui_startup(100.0)
self.specbuttons_load()
#-- Shortcut for glade.get_widget()
# Allows access to widgets as direct attributes instead of using .get_widget()
# Also looks in self.channels[] for the named channel plugins
def __getattr__(self, name):
if name in self.channels:
|
| ︙ | ︙ | |||
441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
pix = uikit.pixbuf(logo.png, decode=1, fmt="png")
if map and map in (2,5,0): # gtk.ICON_SIZE_SMALL_TOOLBAR / _DND / _DIALOG
r = { 2: 0.45, 5: 0.75, 0: 1.0 }[map]
if r != 1.0:
pix = pix.scale_simple(int(321*r), int(115*r), gtk.gdk.INTERP_BILINEAR)
self.img_logo.set_from_pixbuf(pix)
# load application state (widget sizes, selections, etc.)
def init_app_state(self):
winlayout = conf.load("window")
if (winlayout):
try:
uikit.app_restore(self, winlayout)
| > > > > > > > > > > > > > > | 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 |
pix = uikit.pixbuf(logo.png, decode=1, fmt="png")
if map and map in (2,5,0): # gtk.ICON_SIZE_SMALL_TOOLBAR / _DND / _DIALOG
r = { 2: 0.45, 5: 0.75, 0: 1.0 }[map]
if r != 1.0:
pix = pix.scale_simple(int(321*r), int(115*r), gtk.gdk.INTERP_BILINEAR)
self.img_logo.set_from_pixbuf(pix)
# Extra buttons
def specbuttons_load(self):
x = 0
for btn,cmd in conf.specbuttons.items():
log.BTN(btn, cmd)
i = gtk.Image()
i.set_from_stock(btn, gtk.ICON_SIZE_SMALL_TOOLBAR)
b = gtk.Button(btn, btn)
b.connect("clicked", lambda *x: action.run(cmd))
self.specbuttons.attach_defaults(b, int(x / 2), int(x/2)+1, x%2, (x%2)+1)
x = x + 1
self.specbuttons.attach_defaults(b, int(x / 2), int(x/2)+1, x%2, (x%2)+1)
x = x + 1
self.specbuttons.show_all()
# load application state (widget sizes, selections, etc.)
def init_app_state(self):
winlayout = conf.load("window")
if (winlayout):
try:
uikit.app_restore(self, winlayout)
|
| ︙ | ︙ |