diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..685a64b --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,45 @@ +# Notepad Code of Conduct + +Welcome to Notepad, a simple and lightweight text editor. We are committed to providing a positive and inclusive environment for all users. Please review and adhere to the following guidelines when participating in our community. + +## 1. Be Respectful + +Treat others with respect and kindness. Disagreements may arise, but constructive criticism and polite language are essential. Harassment, discrimination, or any form of offensive behavior will not be tolerated. + +## 2. Inclusive Community + +We welcome contributors and users from all backgrounds. Be considerate and inclusive, respecting different perspectives and experiences. Discrimination based on race, gender, sexual orientation, disability, or any other factor is unacceptable. + +## 3. Open Communication + +Communicate openly and transparently. Share your ideas, feedback, and concerns in a constructive manner. Encourage collaboration and support fellow contributors. + +## 4. Focus on the Code + +Keep discussions and feedback focused on improving the project. Avoid personal attacks or criticism unrelated to the code or the project's goals. + +## 5. Collaborate Effectively + +Work together efficiently by providing clear and constructive feedback. Be open to collaboration and assist others when needed. Our collective goal is the success of Notepad. + +## 6. Respect Privacy + +Respect the privacy of others. Do not share personal information without consent. Be mindful of the information shared within the community. + +## 7. Report Violations + +If you witness any violations of this Code of Conduct, report them to the project maintainers. They will address the issue promptly and ensure a fair resolution. + +## Enforcement + +Violations of the Code of Conduct may result in temporary or permanent exclusion from the Notepad community. The severity and consequences of each case will be determined by the project maintainers. + +## Conclusion + +By participating in the Notepad community, you agree to abide by this Code of Conduct. We appreciate your contribution and collaboration in creating a welcoming and respectful environment. + +Thank you for being a part of Notepad! + +--- + +**Note:** This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..5880438 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,80 @@ +# Contributing to Notepad + +Welcome to Notepad! We appreciate your interest in contributing. Before you get started, please take a moment to review the guidelines outlined below. + +## Getting Started + +1. **Fork the repository:** Click the "Fork" button on the top right of the [Notepad repository](https://github.com/abdullahCoder-Tech/Notepad) to create your copy. + +2. **Clone the repository:** Clone your forked repository to your local machine. + + ```bash + git clone https://github.com/your-username/notepad.git + cd notepad + ``` + +3. **Install dependencies:** Ensure you have Python and PyQt5 installed. You can install PyQt5 using the following: + + ```bash + pip install PyQt5 + ``` + +4. **Create a virtual environment (optional but recommended):** It's a good practice to use a virtual environment to manage dependencies. + + ```bash + python -m venv venv + source venv/bin/activate # On Windows, use `venv\Scripts\activate` + ``` + +5. **Run Notepad:** Execute the `notepad.py` script to launch the application. + +## Contributing Guidelines + +### Reporting Issues + +If you encounter any bugs or have suggestions for improvements, please [open an issue](https://github.com/abdullahCoder-Tech/Notepad/issues) with a clear and detailed description. Include steps to reproduce the issue if applicable. + +### Making Changes + +1. Create a new branch for your changes: + + ```bash + git checkout -b feature/your-feature-name + ``` + +2. Implement your changes and commit them: + + ```bash + git add . + git commit -m "Add your commit message here" + ``` + +3. Push your changes to your fork: + + ```bash + git push origin feature/your-feature-name + ``` + +4. Submit a pull request: + + - Go to your fork on GitHub. + - Click on "Compare & pull request" for the branch you just pushed. + - Provide a clear title and description for your pull request. + +### Code Style + +Follow the existing code style and conventions used in the project. If in doubt, refer to the [Python PEP 8 Style Guide](https://www.python.org/dev/peps/pep-0008/). + +### Testing + +Ensure that your changes have been tested thoroughly. If applicable, add new test cases or update existing ones. + +## Code of Conduct + +Please adhere to our [Code of Conduct](CODE_OF_CONDUCT.md) when participating in the Notepad community. + +## License + +By contributing to Notepad, you agree that your contributions will be licensed under the [project's license](LICENSE). + +Thank you for contributing to Notepad! 🚀 diff --git a/main.py b/main.py index 8b26add..2c2d268 100644 --- a/main.py +++ b/main.py @@ -38,6 +38,8 @@ def init_ui(self): # Create a QTextEdit widget self.text_edit = PlainTextEdit(self) self.setCentralWidget(self.text_edit) + # Set window icon explicitly + self.setWindowIcon(QIcon('icon.ico')) # Increase font size for the menu bar menubar = self.menuBar() @@ -286,7 +288,11 @@ def save_file(self): def save_file_as(self): options = QFileDialog.Options() +<<<<<<< HEAD + file_name, _ = QFileDialog.getSaveFileName(self, 'Save File', '', 'Text Files (*.txt);;C++ Files (*.cpp);;C Files(*.c);;Python Files (*.py);;All Files (*)', options=options) +======= file_name, _ = QFileDialog.getSaveFileName(self, 'Save File', '', 'Text Files (*.txt);;C++ Files (*.cpp);;C Files(*.c);;Python Files (*.py);;C Sharp Files (*.cs);;All Files (*)', options=options) +>>>>>>> main if file_name: self.current_file = file_name self.save_file()