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

Better file dialogue #36053

Closed
wants to merge 973 commits into from
Closed

Conversation

ShlomiRex
Copy link
Contributor

@ShlomiRex ShlomiRex commented Feb 9, 2020

This branch is for making file dialogue like file explorer, with Last modified and Size of files and folders and user can sort by those columns, support for diffirent column placement (last modified can be first column, etc..)

Source branch:
master

Peek 2020-02-07 16-53

Bugs to fix:

  • When selecting an already selected row, it deselects it. Note: Issue #36047
  • When going up a directory or into directory I get this: (It still works, just throws error)

ERROR: deselect_all: Condition "item == prev_item" is true.
At: scene/gui/tree.cpp:3210.

Features to implement:

  • Instead of tree title being just a string, turn it to button so when it is clicked, file dialogue will sort the entries by that column. Currently it is very complex maybe in the future
  • Add more rich Date options, like date formats and such. Instead of using _OS singleton to get date you can use Date Object. People don't like this feature, also it should be other pull request, unrelated to UI
  • Columns's width should change like when using SliderContainer Like the first, it is very complex, maybe in the future it will be available

Issues closed:

@Calinou
Copy link
Member

Calinou commented Feb 9, 2020

Thanks for working on this, it will be much appreciated 🙂

I noticed dates on the screenshot aren't padded; you can use some_string.pad_zeros(2) to pad dates/times. Also, it's probably a better idea to default to an ISO 8601-like format such as YYYY-MM-DD HH:MM if we can't detect the user's date format easily.

@ShlomiRex ShlomiRex changed the title Better file dialog [WIP] Better file dialog Feb 9, 2020
@ShlomiRex ShlomiRex changed the title [WIP] Better file dialog [WIP] Better file dialogue Feb 9, 2020
@ShlomiRex ShlomiRex changed the base branch from master to 3.2 February 9, 2020 17:02
@YeldhamDev
Copy link
Member

It would be nice to have those enhancements in the EditorFileDialog as well.

@ShlomiRex
Copy link
Contributor Author

Thanks for working on this, it will be much appreciated slightly_smiling_face

I noticed dates on the screenshot aren't padded; you can use some_string.pad_zeros(2) to pad dates/times. Also, it's probably a better idea to default to an ISO 8601-like format such as YYYY-MM-DD HH:MM if we can't detect the user's date format easily.

Thanks ill try to impliment it.
Is there a way to have a Tree with the TreeItem (rows) being other Controls ?
Like Tree that all the children are Buttons?
Moreover I fixed the de-select problem

Lastly, what do you think about having adjustable column's size? Like Split container

@Calinou
Copy link
Member

Calinou commented Feb 11, 2020

Lastly, what do you think about having adjustable column's size? Like Split container

I guess this would have to be implemented in Tree, but it's a pretty complex class already.

@ShlomiRex ShlomiRex changed the base branch from 3.2 to master February 11, 2020 21:36
@ShlomiRex ShlomiRex force-pushed the better_file_dialog branch 2 times, most recently from 6b2e3f7 to fad88e1 Compare February 12, 2020 01:22
@ShlomiRex
Copy link
Contributor Author

Pull request is ready for merge

@ShlomiRex ShlomiRex changed the title [WIP] Better file dialogue Better file dialogue Feb 12, 2020
}

FileAccess::FileSize FileAccess::get_size_simplified(const String &p_file) {
Dictionary dic = get_sizes(p_file);
Copy link
Contributor

@Zylann Zylann Feb 12, 2020

Choose a reason for hiding this comment

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

Allocating a dictionary containing several multiples of of the same original size only to return it as a one size sounds a bit wasteful, also no other code seems to use it anyways. Just compute this in the same function without intermediary.

@Calinou Calinou removed the request for review from a team May 19, 2020 14:19
akien-mga and others added 19 commits June 21, 2020 21:42
The Haiku port now resides at:
https://github.com/godotengine/godot-haiku-platform

While we're happy to support as many Free and Open Source platforms as we can,
we need to put the main focus on the platforms that we can reasonably maintain,
and for Haiku we have been lacking maintainers ever since the port was first
merged in 2015.

The Haiku code has not been compiling and much less working at least since the
release of Godot 3.0, and while some attempts have been made at fixing things,
it's still not functional today in the `3.2` branch (and much less in `master`,
understandably).

Having it in an external repository should hopefully enable Haiku contributors
to fix issues in their own time, and possibly tag versions compatible with
past Godot releases once they are ready.

(cherry picked from commit efcc508)
Co-authored-by: Aaron Franke <[email protected]>
(cherry picked from commit 29e901c)
…e in dynamic contexts"

This reverts commit 42a3150.

It breaks compat as is and needs some further work before it can be
cherry-picked for 3.2.x.
(cherry picked from commit a94ba7b)
…stringify

Fix for a crash on printing freed object
This reverts commit 7f61710.

See godotengine#38868, in its current implementation a small skew value might end up
serialized to scene files due to floating point precision errors, which is
detrimental to VCS.

This can be cherry-picked anew once a fix for godotengine#38868 has been found.
Prevent the gizmo distance from being zero by MAX-ing it with CMP_EPSILON

(cherry picked from commit ed2bbdb)
…payment-plugin

Remove GodotPayment android plugin (3.2)
…e changes, ensure mouse_mode is set before `cursor_set_shape` is called to restore cursor.

(cherry picked from commit fc1d1c3)
@MarcusElg
Copy link
Contributor

@ShlomiRex you gotta rebase this...

@aaronfranke
Copy link
Member

@ShlomiRex It seems that you rebased incorrectly. Please read this documentation article for more information: https://docs.godotengine.org/en/latest/community/contributing/pr_workflow.html

Alternatively, if you want to use a GUI, watch this video: https://www.youtube.com/watch?v=0XKy8YpP5Ww

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

Successfully merging this pull request may close these issues.