Exemplo n.º 1
0
 def execute(self):
     KRun.runCommand(self.command_string, None)
Exemplo n.º 2
0
 def mouseDoubleClickEvent(self, event):
     KRun.runCommand(self.item.command, None)
Exemplo n.º 3
0
 def mouseDoubleClickEvent(self, event):
     KRun.runCommand(self.item.command, None)
Exemplo n.º 4
0
    CheckArguments(1)

    app = KApplication()
    command = args.arg(0).toLocal8Bit()
    if command == "properties":
        CheckArguments(2)
        fileList = []
        for index in range(1, args.count()):
            fileList.append(KFileItem(args.url(index), "", 0))

        propertiesDialog = KPropertiesDialog(KFileItemList(fileList))
        propertiesDialog.exec_()
    elif command == "openwith":
        CheckArguments(2)
        fileList = []
        for index in range(1, args.count()):
            fileList.append(args.url(index))

        fileList = KUrl.List(fileList)
        propertiesDialog = KOpenWithDialog(fileList)
        if propertiesDialog.exec_():
            service = propertiesDialog.service()
            if service == None:
                print("No service set, running " + propertiesDialog.text() +
                      "\n")
                service = KService(propertiesDialog.text(),
                                   propertiesDialog.text(), "")
            KRun.run(service, fileList, None)
    else:
        Help()
Exemplo n.º 5
0
    
    args = KCmdLineArgs.parsedArgs()
    CheckArguments(1)

    app = KApplication()    
    command = args.arg(0).toLocal8Bit();
    if command == "properties":
      CheckArguments(2)      
      fileList = []  
      for index in range(1, args.count()):
	fileList.append(KFileItem(args.url(index), "", 0))
    
      propertiesDialog = KPropertiesDialog(KFileItemList(fileList));
      propertiesDialog.exec_()   
    elif command == "openwith":
      CheckArguments(2)
      fileList = []  
      for index in range(1, args.count()):
	fileList.append(args.url(index))
    
      fileList = KUrl.List(fileList)
      propertiesDialog = KOpenWithDialog(fileList)
      if propertiesDialog.exec_():
        service = propertiesDialog.service()
        if service == None:
  	  print("No service set, running " + propertiesDialog.text() + "\n")
  	  service = KService(propertiesDialog.text(), propertiesDialog.text(), "")
        KRun.run(service, fileList, None)
    else:
      Help()