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

wxGUI: Add copy path to mapset item in context menu #2865

Merged
merged 5 commits into from
Mar 20, 2023

Conversation

firedragonironfist
Copy link
Contributor

This change resolves #2613 I added "copy path to mapset" item in context menu and added function "onCopyMapsetPath"
Please let me know if you have any further feedback or concerns.

Signed-off-by: Yousuf yousufmohd223@gmail.com

@wenzeslaus
Copy link
Member

Please send a screenshot of the new GUI and fix the Flake8, Pylint, and Black errors reported by CI.

I'm updating Black in a different PR, but that should not be a problem here.

@petrasovaa
Copy link
Contributor

Please test it. I don't understand the changes you submitted, but they are certainly not copying the path to mapset to clipboard. See e.g. OnCopyName for example to follow.

@firedragonironfist
Copy link
Contributor Author

Great! Thank you for the information. I will incorporate the necessary changes in the PR.

@firedragonironfist
Copy link
Contributor Author

Hi @wenzeslaus, I'm having trouble opening the new GUI that I have been working on. I've tried running the program, but I haven't been able to get the GUI to open. Would you happen to have any resources or instructions that could help me get the GUI up and running? Any guidance or assistance you can provide would be greatly appreciated. Thank you!

@wenzeslaus
Copy link
Member

What did you try to run it? On macOS and Linux, you need to compile the source code. On Windows, for a small change like this, the easiest thing is to modify the file in your installation or get a virtual machine with Ubuntu.

@wenzeslaus wenzeslaus added enhancement New feature or request GUI wxGUI related Python Related code is in Python labels Mar 2, 2023
@firedragonironfist
Copy link
Contributor Author

I am using windows , I went through the document of compile and install but I am not getting clear idea on how to compile and install the source code

@wenzeslaus
Copy link
Member

As I said, for a small first time change such as this, avoid compiling on Windows unless that's something you are familiar with, use an Ubuntu virtual machine or just edit the file in the installation after you installed the standard binary installer (from the website).

@firedragonironfist
Copy link
Contributor Author

Thank you so much @wenzeslaus for the info I will check right away

@firedragonironfist
Copy link
Contributor Author

Hey @wenzeslaus I installed GRASS GIS and I tried to find the context menu but I was not able to
Screenshot 2023-03-02 215746
can you please give me some guidance

@wenzeslaus
Copy link
Member

The menu on the screenshot is the correct one. You are using legacy version (7.8), you need to use more recent one, ideally the latest preview (8.3) to make the change in the right place. The preview version reflects the main branch of this repo on the day when it was build.

@firedragonironfist
Copy link
Contributor Author

Hey @wenzeslaus I am stuck on how to download 8.3 version as it is opening Index of/ page I searched the net and it is asking me to use wget to download the contents but cmd or windows powershell is not accepting the command can you please guide me

@hellik
Copy link
Member

hellik commented Mar 3, 2023

Hey @wenzeslaus I am stuck on how to download 8.3 version as it is opening Index of/ page I searched the net and it is asking me to use wget to download the contents but cmd or windows powershell is not accepting the command can you please guide me

https://wingrass.fsv.cvut.cz/grass83/

There are daily wingrass 8.3 builds; though stuck somewhere in the end of February.

Right click on the latest build within the browser and save the exe.

What is exactly your problem while downloading?

@firedragonironfist
Copy link
Contributor Author

Hey @hellik thanks for the info actually when I was trying to run the .exe file microsoft was not letting me to install an Unrecognized app so I turned the windows defender off and now the app is running fine

@firedragonironfist
Copy link
Contributor Author

Screenshot 2023-03-03 163858
Can you please confirm if this is the right ouput which we should get when we use copy to mapset option

@wenzeslaus
Copy link
Member

In your case, it should be C:\Users\...Documents\grassdata\demolocation\PERMANENT. It should put the path to the clipboard. The path is to the directory (folder) which is the mapset (aka subproject). (Right now, I'm just reading here, not checking the actual code.)

@firedragonironfist
Copy link
Contributor Author

Screenshot 2023-03-03 122822

@firedragonironfist
Copy link
Contributor Author

Can I now add a PR?

@firedragonironfist
Copy link
Contributor Author

The item when clicked puts the path to the clipboard and then we can paste it in the python script or CLI by paste option

@petrasovaa
Copy link
Contributor

You should probably use os.path.join or pathlib to create the mapset path. Please update the PR with what you have so that we can further comment on it.

@firedragonironfist
Copy link
Contributor Author

Thank you so much for the info I will do the necessary changes right away

@firedragonironfist
Copy link
Contributor Author

Hey @petrasovaa I have made the necessary changes and I verified it by running the app
Screenshot 2023-03-03 223247

@nilason
Copy link
Contributor

nilason commented Mar 3, 2023

Would you be so kind and NOT posting screenshots of code. Thank you!

@firedragonironfist
Copy link
Contributor Author

ok sorry won't do it again

@echoix
Copy link
Member

echoix commented Mar 3, 2023

Would you be so kind and NOT posting screenshots of code. Thank you!

The easiest way in order to be able to track back is by using the "copy permalink" menu options at various places on the GitHub website. For example, selecting multiple lines (so they are yellow), and on the ..., choose Copy Permalink.

If it's in the same repo, usually there will be a preview of the selected lines shown.

@petrasovaa
Copy link
Contributor

Works fine! Please make the option also available for multiple mapsets, looks like your code already can do that, see _popupMenuMultipleMapsets. Also please run black on your code.

@firedragonironfist
Copy link
Contributor Author

Ok will add the necessary changes right away

@firedragonironfist
Copy link
Contributor Author

Hey @petrasovaa ,
I hope this message finds you well. I wanted to express my interest in participating in GSoC in your organization. I understand that GSoC is a competitive program and that there are limited spots available. However, I am eager to prove my worth and demonstrate my capabilities.

Therefore, I would like to kindly request you to assign me other issues that you would want me to work on so that I can showcase my skills and potential to contribute to your organization. I believe that with additional assignments, I can demonstrate my commitment and capability to make meaningful contributions to your projects.

Thank you for considering my request.

@firedragonironfist
Copy link
Contributor Author

Hey @wenzeslaus
I hope this message finds you well. I wanted to follow up on my pull request that I submitted almost 2 days ago. I am eager to know the status of my request and would appreciate it if you could please let me know when you have a chance.

Copy link
Contributor

@petrasovaa petrasovaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you this looks good! I suggested just a small change in the label.

gui/wxpython/datacatalog/tree.py Outdated Show resolved Hide resolved
@petrasovaa petrasovaa added this to the 8.3.0 milestone Mar 20, 2023
@petrasovaa
Copy link
Contributor

The mac os check failure is unrelated to this.

@petrasovaa petrasovaa merged commit c2c09ed into OSGeo:main Mar 20, 2023
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Mar 20, 2023
@wenzeslaus wenzeslaus changed the title Added copy path to mapset item in context menu and added function onCopyMapsetPath wxGUI: Add copy path to mapset item in context menu Jun 6, 2023
neteler pushed a commit to nilason/grass that referenced this pull request Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request GUI wxGUI related Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] Copy mapset path from Data Catalog with right click
6 participants