Index: config.py ================================================================== --- config.py +++ config.py @@ -121,10 +121,13 @@ } 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, Index: gtk3.xml.gz ================================================================== --- gtk3.xml.gz +++ gtk3.xml.gz cannot compute difference between binary files Index: st2.py ================================================================== --- st2.py +++ st2.py @@ -162,10 +162,12 @@ "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, @@ -195,10 +197,11 @@ # 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 @@ -443,10 +446,24 @@ 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):