Skip to content
This repository has been archived by the owner on Aug 25, 2024. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
frank038 authored Mar 25, 2024
1 parent b5b83cb commit 8622a48
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pyeditor/pyeditor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# V 0.9.12
# V 0.9.13
import sys
from PyQt5.QtWidgets import (qApp,QMainWindow,QStyleFactory,QWidget,QFileDialog,QSizePolicy,QFrame,QBoxLayout,QVBoxLayout,QHBoxLayout,QLabel,QPushButton,QApplication,QDialog,QMessageBox,QLineEdit,QComboBox,QCheckBox,QAction,QMenu,QStatusBar,QTabWidget)
from PyQt5.QtCore import (Qt,pyqtSignal,QFile,QIODevice,QPoint,QMimeDatabase)
Expand Down Expand Up @@ -292,9 +292,11 @@ def __init__(self):
elif EDITORTYPE == "javascript":
self.isargument = 3
use_mimetype = 0
elif EDITORTYPE == "text" or EDITORTYPE == "":
elif EDITORTYPE == "text":
self.isargument = 4
use_mimetype = 0
elif EDITORTYPE == "":
use_mimetype = 1
# check from the mimetype of the file
if use_mimetype:
self.isargument = self.set_mimetype(afilename)
Expand Down Expand Up @@ -324,6 +326,8 @@ def set_mimetype(self, afile):
return 3
elif file_type == "text/plain":
return 4
else:
return 4

def on_tab_changed(self, idx):
# self.sender().tabText(idx)
Expand Down

0 comments on commit 8622a48

Please sign in to comment.