~quadrispro/identicurse/master

« back to all changes in this revision

Viewing changes to src/identicurse/identicurse.py

  • Committer: Psychedelic Squid
  • Date: 2011-06-28 01:47:17 UTC
  • Revision ID: git-v1:42c850476a08980b37af91d0df88eba435acfebc
Toggle notice links keybinding, default L (shift+l).

Show diffs side-by-side

added added

removed removed

Lines of Context:
362
362
            "qreply", "creply", "cfav", "cunfav", "ccontext", "crepeat", "cnext", "cprev", "cfirst",
363
363
            "clast", "nextmatch", "prevmatch", "creplymode", "cquote", "tabswapleft", "tabswapright",
364
364
            "cdelete", "pausetoggle", "pausetoggleall", "scrollup", "scrolltop", "pageup", "pagedown",
365
 
            "scrolldown", "scrollbottom")
 
365
            "scrolldown", "scrollbottom", "togglenoticelinks")
366
366
 
367
367
        default_keys = {
368
368
            "nexttab": [">"],
402
402
            "cquote": ["E"],
403
403
            "ccontext": ["c"],
404
404
            "pausetoggle": ["p"],
 
405
            "togglenoticelinks": ["L"],
405
406
            }
406
407
 
407
408
        self.keybindings = {}
906
907
                self.tab_bar.tabs = [tab.name for tab in self.tabs]
907
908
                self.tab_bar.current_tab = self.current_tab
908
909
                self.tab_bar.update()
 
910
            elif input in self.keybindings['togglenoticelinks']:
 
911
                config.config["show_notice_links"] = not config.config["show_notice_links"]
 
912
                self.update_tab_buffers()
909
913
            # and now the c* actions, and anything else that shouldn't run on non-timeline tabs
910
914
            if isinstance(self.tabs[self.current_tab], Timeline) and len(self.tabs[self.current_tab].timeline) > 0:  # don't try to do the c* actions unless on a populated timeline
911
915
                if (self.tabs[self.current_tab].chosen_one + 1) > len(self.tabs[self.current_tab].timeline):  # reduce chosen_one if it's beyond the end