Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "New" and "Open" function to the qml frontend #251

Merged
merged 1 commit into from
Mar 24, 2014

Conversation

zguangyu
Copy link
Contributor

I've just read the source code for two days. I need some time to get familiar with the go language. Although this patch is small and easy to write, it works well, except for automatically loading the syntax highlight. I wish my work would be helpful to this project. I will continue contributing to this project.

@FichteFoll
Copy link

I do not think keyboard shortcuts should be hardcoded. They should be automatically changed by parsing the keymap files and comparing command calls with the keyboard shortcuts, but I doubt that logic is there yet.

@zguangyu
Copy link
Contributor Author

Thank you for your review. I agree with you. I will do that these days.

@zguangyu
Copy link
Contributor Author

I encountered some problem on implementing the menu. In sublime text, the content of menu is defined by some sublime-menu files which combine menu items with commands. Commands in lime is implemented by the backend. However, not all functions can be done by backend, such as opening a dialog to choose a file.

In my opinion, such functions should be implemented by frontend. When a frontend command is triggered, the backend will call the corresponding function of frontend to do that. These commands are limited and could not be extended by plugins. They are more like the interface between backend and frontend.

@hkdobrev
Copy link

@zguangyu0000 See #34 (comment)

There should be a open file command in the backend. The frontend should only have a prompt. After choosing a file it should call the "open file" command from the backend.

@EdVanDance
Copy link
Contributor

@hkdobrev is right.
In general commands should be just sent to the backend. In case of commands that need user input, we get the input first and then sent the command with appropriate parameters.

quarnster added a commit that referenced this pull request Mar 24, 2014
Add "New" and "Open" function to the qml frontend
@quarnster quarnster merged commit 097f014 into limetext:master Mar 24, 2014
@quarnster
Copy link
Member

LGTM, thanks.

I'm ok with hardcoding as a start. A marathon begins with a step and as long as it's a step in the right direction I consider that progress.

The full backend/frontend interface isn't set in stone and we need to figure out how it should work as we come across different issues.

Note that there are two commands at play here prompt_open which is frontend-specific (though possibly implemented in the backend by having a "PromptOpen" call in the Frontend interface) and shows a open file dialog of some sort, and then open_file when the filename is known.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants