Changeset 143

Show
Ignore:
Timestamp:
04/16/2003 05:30:32 PM (6 years ago)
Author:
petli
Message:

Cleaned up my petliwm.py a bit, dropping unused code.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/examples/petliwm.py

    r142 r143  
    3737     border, color, font, views, \ 
    3838     modewindow, modestatus, \ 
    39      mw_clock, mw_biff, mw_apm, \ 
    40      inspect, misc, input, mixer 
     39     mw_clock, \ 
     40     inspect, misc, input 
    4141 
    4242from plwm.cycle import CycleKeys, CycleActivate 
     
    4545 
    4646delta = deltamove.DeltaMove() 
    47  
    48  
    49 # Netscape 6.1 have forgotten how to scroll backwards with the backspace 
    50 # key.  Relearn it, using the XTEST extension.  Oops: naturally this also 
    51 # affected backspace in text edit fields.  Disable entirely until this 
    52 # can be fixed... 
    53  
    54 class MozillaKeys(keys.KeyHandler): 
    55     def __init__(self, obj): 
    56         keys.KeyHandler.__init__(self, obj) 
    57         self.pageup_code = self.wm.display.keysym_to_keycode(XK.XK_Prior) 
    58  
    59 # Disabled for now, as the grabbing means that the faked input will go 
    60 # back to us and not to the Netscape window.  Therefore, only generate 
    61 # event at KeyRelease until I figure out a way around this. 
    62  
    63 #    def Any_BackSpace(self, evt): 
    64 #       if self.pageup_code: 
    65 #           self.wm.display.xtest_fake_input(X.KeyPress, self.pageup_code) 
    66  
    67     def R_Any_BackSpace(self, evt): 
    68         if self.pageup_code: 
    69             self.wm.display.xtest_fake_input(X.KeyPress, self.pageup_code) 
    70             self.wm.display.xtest_fake_input(X.KeyRelease, self.pageup_code, 5) 
    71          
    72 class TeachMozillaBackspace: 
    73     def __client_init__(self): 
    74         if self.res_class == 'Mozilla-bin': 
    75             MozillaKeys(self) 
    76  
    77  
    78 class MyMozillaPopupKeymap(misc.MozillaPopupKeymap): 
    79     M5_a = misc.MozillaPopupKeymap._accept 
    80     _key_name = 'M5-a' 
    8147 
    8248 
     
    9359class MyClient(wmanager.Client, 
    9460               outline.XorOutlineClient, 
    95                # outline.WindowOutlineClient, 
    9661               border.BorderClient, 
    9762               modestatus.ModeFocusedTitleClient, 
    98                #misc.InhibitMozillaPopups, 
    9963               misc.InitialKeepOnScreenClient, 
    10064               focus.JumpstartClient, 
    101                # TeachMozillaBackspace, 
    10265               ): 
    10366     
     
    10871    default_pointer_pos = {'Emacs': (-1, 0), 
    10972                           'XTerm': (-1, 0)} 
    110  
    111     mozpopup_keymap = MyMozillaPopupKeymap 
    11273 
    11374    border_color_name = "grey20" 
     
    13697           font.Font, 
    13798           mw_clock.ModeWindowClock, 
    138            # mw_biff.ThreadedModeWindowBiff, 
    139            mw_apm.ModeWindowAPM, 
    140            mixer.Mixer, 
    14199           inspect.InspectServer, 
    142100           WMConfig):