Uncluttering dillos UI - getting rid of the dialog boxes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hey everyone :) somewhere deep inside the "Future of Dillo" monster thread I suggested to get rid of the location dialog box but Johannes pointed out that this breaks the fullscreen mode. So, here is my proposed solution: * on ctrl-l: focus location bar * if in fullscreen mode: temporarily show toolbars until the user pressed enter I am not familiar with the fltk event model, so I just hijacked the existing event handler which works reasonably well. It would be nice to also capture any "on-blur" events, but I could use some hints (the fltk2 documentation only mentions 6 WHEN_* events, though some googling suggests that there might be UNFOCUS events... uh?). Anyway, the patch is attached. let me know what you think. Justus - -- gpg key fingerprint: C82D 382A AB38 1A54 5290 19D6 A0F9 B035 686C 6996 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFILd5xoPmwNWhsaZYRApqEAJ9glSSkR3Q9oU0BmmUf9/ErG/ItfwCfVs5M asgEwaQAMk4ggsfzO2toTc0= =MHCi -----END PGP SIGNATURE-----
Hi, On Fri, May 16, 2008 at 09:20:17PM +0200, Justus Winter wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hey everyone :)
somewhere deep inside the "Future of Dillo" monster thread I suggested to get rid of the location dialog box but Johannes pointed out that this breaks the fullscreen mode.
So, here is my proposed solution:
* on ctrl-l: focus location bar * if in fullscreen mode: temporarily show toolbars until the user pressed enter
I am not familiar with the fltk event model, so I just hijacked the existing event handler which works reasonably well. It would be nice to also capture any "on-blur" events, but I could use some hints (the fltk2 documentation only mentions 6 WHEN_* events, though some googling suggests that there might be UNFOCUS events... uh?).
Anyway, the patch is attached. let me know what you think.
Cool! I like it already better than the dialog box. What do you mean by "on-blur" events? Johannes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Johannes Hofmann wrote:
Cool! I like it already better than the dialog box. What do you mean by "on-blur" events? I like to be notified the moment the input box loses focus. For some reason the code works quite well as it is (a comment in the source code mentions this might be a fltk bug :-/), but it is possible to leave the location box without triggering the event handler. But relying on some undocumented and or buggy behavior is obviously not an option ;).
I'd expect something like inputbox->when(WHEN_ENTER_KEY | UNFOCUS) but I have no experience with fltk at all and a quick look into the callback section of their documentation didn't help either. Justus - -- gpg key fingerprint: C82D 382A AB38 1A54 5290 19D6 A0F9 B035 686C 6996 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFILei8oPmwNWhsaZYRAqidAJwMMweoNyvL+yMLbPXv6udUU7BiNQCgiSU3 VxfMpr6FsBJifzC/ecmqJ0o= =P3yn -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I thought about dillos fullscreen mode, which is not a fullscreen mode at all but a "get rid of those panels"-mode. So I decided to rename those functions and variables accordingly (00-*) to make it possible to implement a real fullscreen mode (01-*). Cheers, Justus - -- gpg key fingerprint: C82D 382A AB38 1A54 5290 19D6 A0F9 B035 686C 6996 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFILv3RoPmwNWhsaZYRAtAeAKCpvjp7U4n+NW7U25gfd1DJDpnGkACeJw2c PhKxtMxtFGQ1zPs+Qi/Wv8o= =jxiR -----END PGP SIGNATURE-----
On Sat, May 17, 2008 at 05:46:26PM +0200, Justus Winter wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I thought about dillos fullscreen mode, which is not a fullscreen mode at all but a "get rid of those panels"-mode. So I decided to rename those functions and variables accordingly (00-*) to make it possible to implement a real fullscreen mode (01-*).
shouldn't window resizing be done by the window manager? Do we really need to implement this inside dillo? I agree on the name change however. Cheers, Johannes
On Sun, May 18, 2008 at 07:15:11PM +0200, Johannes Hofmann wrote:
On Sat, May 17, 2008 at 05:46:26PM +0200, Justus Winter wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I thought about dillos fullscreen mode, which is not a fullscreen mode at all but a "get rid of those panels"-mode. So I decided to rename those functions and variables accordingly (00-*) to make it possible to implement a real fullscreen mode (01-*).
shouldn't window resizing be done by the window manager?
Yes, AFAIS.
Do we really need to implement this inside dillo?
I'd let the WM do it. (e.g. ALT+F11 in Xfce).
I agree on the name change however.
Maybe "fullwindow" is a good name. -- Cheers Jorge.-
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jorge Arellano Cid wrote:
On Sun, May 18, 2008 at 07:15:11PM +0200, Johannes Hofmann wrote:
shouldn't window resizing be done by the window manager?
Yes, AFAIS.
Do we really need to implement this inside dillo?
I'd let the WM do it. (e.g. ALT+F11 in Xfce).
The problem with this is that we cannot switch to fullwindow mode the moment the windowmanager maximizes our window since fltk does not expose whether our window is in fullscreen mode or not. And we cannot do things like start in fullscreen mode (would be nice for presentations etc). In x11-land there is a NetWM property for this: $ xprop | grep _NET_WM_STATE _NET_WM_STATE(ATOM) = _NET_WM_STATE_FULLSCREEN We could - listen for XPropertyEvents inside of dillo (ugly) - modify fltk to expose those events (nice) But what about the two other major platforms? The homepage states that one of dillos objectives is to be platform independent. I doubt that there's a fullscreen functionality for windows apps, and I have no idea about osx. This seems like a lot of work for a functionality that works (at least it should work) across all three major platforms with a ~30 lines of code patch. What's the problem besides "on x11 the wm should take care of this"? It doesn't break anything, does it? Justus - -- gpg key fingerprint: C82D 382A AB38 1A54 5290 19D6 A0F9 B035 686C 6996 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIMbiVoPmwNWhsaZYRAs2MAJ955OOtsLhdC3NVyNRUC0kkOd6hbgCeMCnd Sd4ofspcJb/5MfbgF83xzTw= =aQ+g -----END PGP SIGNATURE-----
On Sat, May 17, 2008 at 05:46:26PM +0200, Justus Winter wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I thought about dillos fullscreen mode, which is not a fullscreen mode at all but a "get rid of those panels"-mode. So I decided to rename those functions and variables accordingly (00-*)
Committed. With the addition that when the Location is already focused, the text is also selected. This helps as a visual clue and also to quickly get rid of the old URL. Note: I used a trick in ::handle() to do it. If you know a better way, please send a patch. BTW, it'd be great if we can get rid of the findtext window, and place it as an horizontal widget near the bottom (i.e as FF).
to make it possible to implement a real fullscreen mode (01-*).
Not committed yet. More on this in my next post... -- Cheers Jorge.-
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jorge Arellano Cid wrote:
On Sat, May 17, 2008 at 05:46:26PM +0200, Justus Winter wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I thought about dillos fullscreen mode, which is not a fullscreen mode at all but a "get rid of those panels"-mode. So I decided to rename those functions and variables accordingly (00-*)
Committed.
With the addition that when the Location is already focused, the text is also selected. This helps as a visual clue and also to quickly get rid of the old URL.
Note: I used a trick in ::handle() to do it. If you know a better way, please send a patch.
Yes, that's a nice feature indeed. Reading the fltk documentation I came up with the attached patch. I am pretty sure that strlen is the wrong function when dealing with utf-8 character data, but you get the idea. Justus - -- gpg key fingerprint: C82D 382A AB38 1A54 5290 19D6 A0F9 B035 686C 6996 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIM0OmoPmwNWhsaZYRAi0KAJ9B9akYL9AN1c51U0HJoXe9imPcjwCfe7I2 oGA/oCVvuUyZ3+CYPBPsH5U= =SCqk -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Justus Winter wrote:
Jorge Arellano Cid wrote:
On Sat, May 17, 2008 at 05:46:26PM +0200, Justus Winter wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I thought about dillos fullscreen mode, which is not a fullscreen mode at all but a "get rid of those panels"-mode. So I decided to rename those functions and variables accordingly (00-*) Committed.
With the addition that when the Location is already focused, the text is also selected. This helps as a visual clue and also to quickly get rid of the old URL.
Note: I used a trick in ::handle() to do it. If you know a better way, please send a patch.
Yes, that's a nice feature indeed. Reading the fltk documentation I came up with the attached patch. I am pretty sure that strlen is the wrong function when dealing with utf-8 character data, but you get the idea.
Justus
Looking at the fltk source I realized that Input::size() does exactly what we want and is also much more efficient. Revised patch is attached. Sorry for the spam. Justus - -- gpg key fingerprint: C82D 382A AB38 1A54 5290 19D6 A0F9 B035 686C 6996 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIM9kSoPmwNWhsaZYRAhaDAKC7A/I3SYJJRYIJ/kzbw0VI/afG0QCgm+WZ VuXGU9/u8Y64FLaYQyP27o8= =hvqx -----END PGP SIGNATURE-----
On Wed, May 21, 2008 at 10:10:59AM +0200, Justus Winter wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Justus Winter wrote:
Jorge Arellano Cid wrote:
On Sat, May 17, 2008 at 05:46:26PM +0200, Justus Winter wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I thought about dillos fullscreen mode, which is not a fullscreen mode at all but a "get rid of those panels"-mode. So I decided to rename those functions and variables accordingly (00-*) Committed.
With the addition that when the Location is already focused, the text is also selected. This helps as a visual clue and also to quickly get rid of the old URL.
Note: I used a trick in ::handle() to do it. If you know a better way, please send a patch.
Yes, that's a nice feature indeed. Reading the fltk documentation I came up with the attached patch. I am pretty sure that strlen is the wrong function when dealing with utf-8 character data, but you get the idea.
Justus
Looking at the fltk source I realized that Input::size() does exactly what we want and is also much more efficient. Revised patch is attached.
Committed (with the comment). -- Cheers Jorge.-
participants (3)
-
4winter@informatik.uni-hamburg.de
-
jcid@dillo.org
-
Johannes.Hofmann@gmx.de