~osomon/moovida/upicek_language_option_screen

« back to all changes in this revision

Viewing changes to elisa-core/elisa/core/application.py

Add forgotten tweaks for the command line on windows

Show diffs side-by-side

added added

removed removed

Lines of Context:
542
542
            
543
543
    def _on_copydata(self, hwnd, msg, wparam, lparam):
544
544
        import ctypes
545
 
        from ctypes import Structure, POINTER, byref, c_void_p, c_char, sizeof, cast, addressof, memmove
 
545
        from ctypes import Structure, c_char, sizeof, addressof, memmove
546
546
        from ctypes.wintypes import ULONG, DWORD
547
 
        
548
 
        class COPYDATASTRUCT(Structure):
549
 
            _fields_ = [
550
 
                         ("dwData", POINTER(ULONG)),
551
 
                         ("cbData", DWORD),
552
 
                         ("lpData", c_void_p),
553
 
                       ]
 
547
        from mswin32.structures import COPYDATASTRUCT
554
548
        
555
549
        copydata = COPYDATASTRUCT()
556
550
        memmove(addressof(copydata), lparam, sizeof(copydata))
564
558
        memmove(addressof(commandlinedata), copydata.lpData, sizeof(commandlinedata))
565
559
        frontend = self.interface_controller.frontends.values()[0]
566
560
        main = frontend.retrieve_controllers('/poblesec')[0]
567
 
        for file in commandlinedata.data.split(" "):
568
 
            main.play_file(file)
 
561
        files = commandlinedata.data.split(" ")
 
562
        if len(files) > 0:
 
563
            main.play_file(files[0])
569
564
        
570
565
        return True