Coder Social home page Coder Social logo

Comments (26)

mzso avatar mzso commented on August 19, 2024

I think it would work well, if it were possible to keep the panel (or if necessary it's window too) on top after clicking an item and then close it when I move the cursor off the panel.

from download_panel_tweaker.

Infocatcher avatar Infocatcher commented on August 19, 2024

Panel closing is hardcoded:
chrome://browser/content/downloads/downloads.js

    downloadsCmd_open: function DVIC_downloadsCmd_open()
    {
      this.dataItem.openLocalFile();

      // We explicitly close the panel here to give the user the feedback that
      // their click has been received, and we're handling the action.
      // Otherwise, we'd have to wait for the file-type handler to execute
      // before the panel would close. This also helps to prevent the user from
      // accidentally opening a file several times.
      DownloadsPanel.hidePanel();
    },

It's possible to prevent this, but DownloadsPanel.hidePanel() doesn't have checks about hiding success, so something may went wrong.

Also opening of a file may move focus to user's shell, and this may be handled as panel not under cursor.

from download_panel_tweaker.

mzso avatar mzso commented on August 19, 2024

It's possible to prevent this, but DownloadsPanel.hidePanel() doesn't have checks about hiding success, so something may went wrong.

What does this mean in practice?

Also opening of a file may move focus to user's shell, and this may be handled as panel not under cursor.

Can't firefox be made to stay on top? Or maybe get focus and reopen the panel immediately after a click. That way hovering doesn't need to be dealt with.

from download_panel_tweaker.

Infocatcher avatar Infocatcher commented on August 19, 2024

I made some tests... It's even not possible to just move focus back to Firefox window, probably internal focus manager don't understand, that something external is now over browser windows. But it's possible to reopen panel after small delay. Looks strange, but panel (and only panel) appears over all windows.

Can't firefox be made to stay on top?

Only using system API, for each OS, so this is difficult.

Anyway, I've added two new hidden preferences:
extensions.downloadPanelTweaker.reopenPanelAfterShowFile (disabled by default)
extensions.downloadPanelTweaker.reopenPanelAfterShowFile.delay (delay in ms)
download_panel_tweaker-0.2.3pre-fx.xpi (source).

from download_panel_tweaker.

mzso avatar mzso commented on August 19, 2024

It doesn't seem to reopen to me. I set the other program to don't get focus when I open a file but it's still not reopening.

from download_panel_tweaker.

Infocatcher avatar Infocatcher commented on August 19, 2024

You should set extensions.downloadPanelTweaker.reopenPanelAfterShowFile = true first (in about:config) and probably increase extensions.downloadPanelTweaker.reopenPanelAfterShowFile.delay.

from download_panel_tweaker.

mzso avatar mzso commented on August 19, 2024

It was true. I tried 500/5000 just now, but nothing.

from download_panel_tweaker.

Infocatcher avatar Infocatcher commented on August 19, 2024

Oops, I misread. I was thinking about "Open Containing Folder" item from context menu.

from download_panel_tweaker.

mzso avatar mzso commented on August 19, 2024

It works with that. I just hardly ever use that feature. :)
(Curiously only for the menu item and not for the button which does the same thing.)

from download_panel_tweaker.

mzso avatar mzso commented on August 19, 2024

Hello!
I tried with latest master. (overwrote the files in the linked xpi)
It works for opening a file now too. Which is cool. I needed to increase the time because it would instantly close again at small values including default. (set it to 500ms)
I noticed some weirdness though. Apparently the panel is both on top and not in focus somehow. The only way to close it after I opened all the files I wanted is to click on one of the firefox windows clicking on the opened program, or any other program, or the taskbar doesn't do anything.
But I also doesn't have focus because I can't use the mousewheel to scroll. And it still doesn't work if I click on the panel where it doesn't do anything (seprator, border, removed download, scrollbar)
So I have to switch to the firefox window again and then back to the opened program to use it. Which adds a bit of inconvenience.

from download_panel_tweaker.

Infocatcher avatar Infocatcher commented on August 19, 2024

I deeded to increase the time because it would instantly close again at small values including default. (set it to 500ms)

In latest version you can increase extensions.downloadPanelTweaker.reopenPanel.delayFallback to try open panel again and again during that time.

I noticed some weirdness though.

Yes, unfortunately things around panels and focus works strange. All looks good between Firefox windows, but looks like Firefox don't understands about external windows. :(

from download_panel_tweaker.

mzso avatar mzso commented on August 19, 2024

In latest version you can increase extensions.downloadPanelTweaker.reopenPanel.delayFallback to try open panel again and again during that time.

Cool.

Yes, unfortunately things around panels and focus works strange. All looks good between Firefox windows, but looks like Firefox don't understands about external windows. :(

Well, it's still better than having to reopen the panel manually. Maybe as a workaround a small 'x' button could be placed somewhere on the panel so at least it can be closed conveniently.

from download_panel_tweaker.

Infocatcher avatar Infocatcher commented on August 19, 2024

Well, it's still better than having to reopen the panel manually. Maybe as a workaround a small 'x' button could be placed somewhere on the panel so at least it can be closed conveniently.

It's difficult to modify interface...
Now with latest version it's possible to close panel using middle-click on "Show All Downloads" button.

from download_panel_tweaker.

mzso avatar mzso commented on August 19, 2024

Now with latest version it's possible to close panel using middle-click on "Show All Downloads" button.

This doesn't work particularly well. I still need to switch back and forth between the two windows this way. (It would be more useful for if it worked on the panel.)
Can't something like a global hotkey for escape be temporarily created to close the panel without switching back to FF? I usually try pressing esc first if I want to close something that's not a window. And it works on the panel too when FF has focus.

Ps:
Auto builds of the addon would be nice for testing like other projects on github do. eg: ytc, iaextractor

from download_panel_tweaker.

mzso avatar mzso commented on August 19, 2024

Hello!
Something changed. Now firefox doesn't get back the focus and back on top when I close the panel. Apparently nothing gets the focus, but it's still better than before.
Maybe it's different because of the upgrade to FF34.

from download_panel_tweaker.

Infocatcher avatar Infocatcher commented on August 19, 2024

Can't something like a global hotkey for escape be temporarily created to close the panel without switching back to FF?

Unfortunately no, only using OS API and therefore not trivial...

Auto builds of the addon would be nice for testing like other projects on github do. eg: ytc, iaextractor

Oh, I'm lazy to create many builds and don't like to place binaries in sources.

Something changed. Now firefox doesn't get back the focus and back on top when I close the panel. Apparently nothing gets the focus, but it's still better than before.
Maybe it's different because of the upgrade to FF34.

Probably... I don't change things around focus. And API like window.focus() just doesn't work in this case.

from download_panel_tweaker.

mzso avatar mzso commented on August 19, 2024

@Infocatcher commented on 2014. dec. 5. 10:56 CET:

Can't something like a global hotkey for escape be temporarily created to close the panel without switching back to FF?

Unfortunately no, only using OS API and therefore not trivial...

Oh well...

One more thing. Can the middle click close thing be added to the whole panel? Middle klick doesn't seem to be doing anything on any part of the panel outside the footer, so I see no reason why not make it work on the whole panel. It'd only make it more convenient.

from download_panel_tweaker.

Infocatcher avatar Infocatcher commented on August 19, 2024

One more thing. Can the middle click close thing be added to the whole panel? Middle klick doesn't seem to be doing anything on any part of the panel outside the footer, so I see no reason why not make it work on the whole panel. It'd only make it more convenient.

There is disabled by default "Middle-click to remove downloads from panel" option.
I've corrected to close panel after middle-click anywhere inside panel in this case.

from download_panel_tweaker.

mzso avatar mzso commented on August 19, 2024

Great! (I wasn't aware of that option.)

from download_panel_tweaker.

mzso avatar mzso commented on August 19, 2024

One issue I notices is that if I close the panel manually with middle click within the fallback time, the reopening is activated. Which it shouldn't for manual closing.
I increased the fallback value to 1500 because it was working unreliably with small values.

from download_panel_tweaker.

Infocatcher avatar Infocatcher commented on August 19, 2024

One issue I notices is that if I close the panel manually with middle click within the fallback time, the reopening is activated. Which it shouldn't for manual closing.

Indeed... Should be corrected now.

from download_panel_tweaker.

mzso avatar mzso commented on August 19, 2024

Just grabbed the files from the master. But the middle click reopening doesn't seem to have changed. I can get the panel to reopen multiple times with middle click.

from download_panel_tweaker.

Infocatcher avatar Infocatcher commented on August 19, 2024

Strange, works fine for me after fixes.
Test version: download_panel_tweaker-0.2.3pre2-fx.xpi (source).

from download_panel_tweaker.

mzso avatar mzso commented on August 19, 2024

Tried it with setting fallback to 10000. It's inconsistent but I ofte can get it to reopen 1-3 times if I quickly middle click on it, so not for the whole ten seconds.
But if I click on the fiefox gui after opening a file it reopens all the way through, which it shouldn't and didn't do before.

from download_panel_tweaker.

Infocatcher avatar Infocatcher commented on August 19, 2024

Tried it with setting fallback to 10000. It's inconsistent but I ofte can get it to reopen 1-3 times if I quickly middle click on it, so not for the whole ten seconds.

Strange, I'm unable to reproduce...

But if I click on the fiefox gui after opening a file it reopens all the way through, which it shouldn't and didn't do before.

I see. Now reopening will be canceled after mousedown anywhere inside current window.

from download_panel_tweaker.

mzso avatar mzso commented on August 19, 2024

Okay. I can't reproduce it either now. Not even with the old build.

from download_panel_tweaker.

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.