Giter Site home page Giter Site logo

Comments (16)

humdingerb avatar humdingerb commented on June 2, 2024

Yes. This is a shortcoming of the BeAPI, see ticket #8116.
It can be solved like it's done for Expander.

from filer.

owenca avatar owenca commented on June 2, 2024

Ok. So close it?

from filer.

humdingerb avatar humdingerb commented on June 2, 2024

It doesn't feel like the API is going to change in a hurry...
It looks like Filer could do a similar thing as Expander and add a third custom button to the file panel to "Open {current folder}.

from filer.

owenca avatar owenca commented on June 2, 2024

I scanned through the FilePanel and Expander code and think it's doable. Which interface though?

  1. Always enable the Open button and open the top folder shown in the upper left corner if nothing is selected.
  2. Use a dynamic label for the always enabled Open button: "Open {top folder}" or " Open {selected folder}"
  3. Add an always enabled button: "Open {top folder}"

from filer.

humdingerb avatar humdingerb commented on June 2, 2024

I like 2) best.
If/when the user is able to add more than one folder, there's the additional case for "Open {number of folders} folders".

from filer.

owenca avatar owenca commented on June 2, 2024

I experimented with 2) and it didn't work well. First, the Open button is not layout aware (or BFilePanel does not support layout?):
open home
Even if we fix that, the Open button would expand and contract depending on the folder name, and the Cancel button would move back and forth along with it. If the folder name is very long, we would have a very wide Open button.

Another possibility is adding an Open button next to the popup menu button (near the upper left corner) for the parent folder.

from filer.

humdingerb avatar humdingerb commented on June 2, 2024

No idea about the layouting of the buttons in BFilePanel...
And you got a point with jumping buttons because of changing labels, haven't thought of that.
All that considered, I now tend more to solution 1). :)

from filer.

owenca avatar owenca commented on June 2, 2024

Solution 1) can't be implemented because the Add button can't be kept enabled. It's disabled by a BContainerWindow a couple of layers inside the BFilePanel when no files are selected in the panel. I will try solution 3) next.

from filer.

humdingerb avatar humdingerb commented on June 2, 2024

Solution 1) can't be implemented because the Add button can't be kept enabled. It's disabled by a BContainerWindow a couple of layers inside the BFielPanel when no files are selected in the panel.
Too bad. I guess it's not trivial to fix in the Haiku source? Generally, any "Open directory" file panel should open the current folder if none is selected...

from filer.

owenca avatar owenca commented on June 2, 2024

It's very easy to fix the Haiku source code (if the current behavior of the default "Open" button is an oversight instead of by design). What's the process of proposing the change?

from filer.

owenca avatar owenca commented on June 2, 2024

By the way, BFilePanel does not use the layout management and is buggy:
expander 1
expander 2
exppander 3

from filer.

humdingerb avatar humdingerb commented on June 2, 2024

It's very easy to fix the Haiku source code (if the current behavior of the default "Open" button is an oversight instead of by design). What's the process of proposing the change?

You create a patch as described at https://dev.haiku-os.org/wiki/CodingGuidelines/SubmittingPatches then create a ticket at the Haiku bugtracker with a decription what was wrong and how you've fixed it and attach the patch.

You can also add a ticket with the file panel screenshots showing the problems.

from filer.

humdingerb avatar humdingerb commented on June 2, 2024

WRT the artifacts, there's also https://dev.haiku-os.org/ticket/12887

from filer.

owenca avatar owenca commented on June 2, 2024

I think it's a layout issue: the Cancel button and the default Select button are not at the bottom next to the "Select {current}" button. I occasionally had a similar problem with the Add button in the "AutoFiler: Add" window. The problem is gone when I move the BFilePanel::SetButtonLabel() from the constructor to MessageReceived()...

from filer.

humdingerb avatar humdingerb commented on June 2, 2024

No idea if that's a bug or a feature... :)

from filer.

owenca avatar owenca commented on June 2, 2024

fixed in hrev51155

from filer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.