Andreas Kling
ef01af1cb2
LibIPC+IPCCompiler: Remove some unused members from generated messages
2020-02-15 12:10:48 +01:00
Shannon Booth
20d9c431ce
Shell: Use SkipParentAndBaseDir flag in DirIterator
2020-02-15 11:40:05 +01:00
Shannon Booth
6764b77788
LibCore: Add SkipParentAndBaseDir flag in DirIterator
...
Sometimes we may want to iterate over dotfiles but not include the
parent or base directory
2020-02-15 11:40:05 +01:00
Shannon Booth
3879d75219
LibCore: Simplify some of DirIterator's code
...
The main changes are in advance_next() where we flatten some of the
nesting to improve readability
2020-02-15 11:40:05 +01:00
Shannon Booth
9920d17342
AK: Add String starts_with(char) & ends_with(char)
...
This is simply meant to be a more efficient implementation in the
case that we only need to check a single character.
2020-02-15 11:40:05 +01:00
Andreas Kling
0e3a9d8e9d
LibCore: Reduce header dependencies of EventLoop
2020-02-15 02:09:00 +01:00
Andreas Kling
b011ea9962
LibGUI: Reduce menu-related header dependencies
2020-02-15 01:56:30 +01:00
Andreas Kling
9e83bbe1cd
LibGUI: Reduce header dependencies of GUI::Action
2020-02-15 01:34:00 +01:00
Andreas Kling
10ccc9e11c
LibGUI: Don't leak every tooltip window ever :^)
2020-02-15 01:27:37 +01:00
Andreas Kling
dcb0766d3f
LibGUI: Remove some header dependencies from Application.h
2020-02-15 01:18:32 +01:00
Andreas Kling
93e9c2732b
LibGfx: Remove unused Bitmap::load_from_file() for loading raw RGBA
...
This was not used anywhere but added unnecessary members to Bitmap.
2020-02-15 01:06:32 +01:00
Andreas Kling
9c0c677d57
LibGfx: Reduce header dependencies of Bitmap and Font
2020-02-15 01:03:37 +01:00
Andreas Kling
34b5ff7c29
LibGfx: Move a bunch of LogStream::operator<< to cpp files
2020-02-15 00:58:54 +01:00
Andreas Kling
3866e0d4d4
LibCore: Move LogStream::operator<< overloads into cpp files
2020-02-15 00:58:52 +01:00
Andreas Kling
2a41bff329
LibCore: Remove a bunch of unnecessary forward declarations
...
Now that we get LibCore forward declarations from <LibCore/Forward.h>,
we don't need to declare things manually.
2020-02-15 00:32:33 +01:00
Andreas Kling
66903ad987
LibGfx: Remove Utf8View.h dependency from Font.h
2020-02-15 00:27:50 +01:00
Andreas Kling
e1ff4fa034
LibGUI: Remove more header dependencies from Widget.h
2020-02-15 00:24:14 +01:00
Andreas Kling
69400c2ca1
LibCore: Replace manual forward declarations with <LibCore/Forward.h>
2020-02-15 00:13:44 +01:00
Andreas Kling
6a3cd11a80
AK: Remove manual forward declarations with <AK/Forward.h>
2020-02-15 00:12:31 +01:00
Andreas Kling
a368cf7d51
LibGfx: Replace manual forward declarations with <LibGfx/Forward.h>
2020-02-15 00:10:34 +01:00
Andreas Kling
34c7322d77
LibGUI: Remove some header dependencies from Widget.h
2020-02-14 23:53:11 +01:00
Andreas Kling
08cae2773d
LibGfx: More work on header dependency reduction
2020-02-14 23:33:21 +01:00
Andreas Kling
d85b09893d
AK: Add Utf8View to Forward.h
2020-02-14 23:31:18 +01:00
Andreas Kling
22b41a0fa3
AK: Add LogStream and DebugLogStream to Forward.h
2020-02-14 23:31:18 +01:00
Andreas Kling
3fe2640c8c
LibGfx: Add forward declaration header
...
This patch adds <LibGfx/Forward.h> with forward declarations for Gfx.
2020-02-14 23:31:18 +01:00
Andreas Kling
184475d45a
AK: Add SharedBuffer to Forward.h
2020-02-14 23:31:18 +01:00
Andreas Kling
8f7333f080
LibCore: Add a forward declaration header
...
This patch adds <LibCore/Forward.h> and uses it in various places to
shrink the header dependency graph.
2020-02-14 23:31:18 +01:00
Andreas Kling
3bbf4610d2
AK: Add a forward declaration header
...
You can now #include <AK/Forward.h> to get most of the AK types as
forward declarations.
Header dependency explosion is one of the main contributors to compile
times at the moment, so this is a step towards smaller include graphs.
2020-02-14 23:31:18 +01:00
Shannon Booth
8249e666fc
Userland: Fix typos in setting user id
...
Fixes : #1219
2020-02-14 23:30:22 +01:00
Shannon Booth
1f75dfd95d
Userland: Fix error handling in rm program
...
Fixes : #1218
2020-02-14 23:30:22 +01:00
Andreas Kling
5884ef8425
LibGUI: Add missing Event.cpp file
2020-02-14 17:35:04 +01:00
Andreas Kling
814d59f462
LibGUI: Port the drag&drop code to Core::MimeData
2020-02-14 13:18:59 +01:00
Andreas Kling
3cba9c3c25
LibCore: Add Core::MimeData class
...
This object contains zero or more { mime_type, data } entries and will
be used for clipboard data as well as drag & drop.
2020-02-14 13:17:26 +01:00
Andreas Kling
4dc15fc063
FileManager: Copy item(s) when dragging and dropping them :^)
...
This patch implements basic drag & drop file management in a narrow set
of cases. You can now drag & drop a file onto a folder in the same
directory, and the dropped file will be copied into the directory.
We'll need to support a lot more variations of this, but this is nice!
2020-02-13 21:57:02 +01:00
Andreas Kling
95fe78667f
FileManager: Run clang-format on main.cpp
2020-02-13 21:54:27 +01:00
Andreas Kling
2c14e46b96
LibGUI: Indicate ItemView drag acceptance with a little rectangle
...
If an index accepts a drag, we now draw a little rectangle around it
when the drag moves over it.
2020-02-13 21:50:50 +01:00
Andreas Kling
f0ae353c9e
LibGUI: Allow dropping drags on AbstractView
...
You can now drop things on an AbstractView, which will ask its model if
the drag is acceptable to drop at the index where it's dropped.
If it's accepted by the model, the view will fire the on_drop hook.
2020-02-13 21:49:14 +01:00
Andreas Kling
8b3864c70a
LibGUI: Have FileSystemModel accept url-list drags onto directories
2020-02-13 21:48:32 +01:00
Andreas Kling
6e7ca44dee
LibGUI: Add GUI::Model::accepts_drag(index, data_type)
...
This allows a model to indicate whether it would accept a drag with a
given data type being dropped on a given index.
2020-02-13 21:45:46 +01:00
Andreas Kling
3ce80bec97
WindowServer+LibGUI: Add a "drag move" event
...
This allows windows/widgets to learn when something is being dragged
over them. They can then repaint themselves somehow to indicate that
they are willing to accept a drop.
Currently this is piggybacking somewhat on the mouse event mechanism
in WindowServer. I'm not sure that's the best design but it seemed
easier to do it this way right now.
2020-02-13 21:43:32 +01:00
Bogdan
7590270e13
WebServer: Ensure directory listing URLs end with a slash
...
We will now send a redirect (301) if a directory listing is requested and the
request URL doesn't end with a slash character. This makes relative file URLs
that we generate in directory listings actually work as expected.
2020-02-13 20:06:32 +01:00
Andreas Kling
f88fe5dc3f
LibGUI: Don't assert when hovering spacing around single-child Splitter
...
Fixes #1215 .
2020-02-13 20:00:01 +01:00
Andreas Kling
fc562a3a93
WebServer: Remove debug spam in directory listing code
2020-02-13 08:52:24 +01:00
Andreas Kling
f767085eb6
WebServer: Escape HTML entities in path names in directory listings
...
I left a FIXME in here about implementing URL encoding.
2020-02-13 08:51:49 +01:00
Andreas Kling
3e486f75ff
AK: Move escape_html_entities() from LibHTML to AK
...
This sort of thing can be useful to things that don't want to link with
all of LibHTML.
2020-02-13 08:46:00 +01:00
Andreas Kling
deca1d8b77
WebServer: Show file size and modification time in directory listings
...
This exposed an issue with the unveil() implementation which currently
short-circuits path resolution for any path containing "/..". This will
cause the ".." entry to show up with a 1970-01-01 mtime for now. FIXME.
Also add some rulers and a nice little footer. :^)
2020-02-12 21:39:09 +01:00
Andreas Kling
083f3edcb0
WebServer: Add basic directory listings
...
If a directory does not have an index.html file, we will now generate
a directory listing HTML document for that directory on the fly. :^)
2020-02-12 21:18:04 +01:00
Andreas Kling
90fec9c732
LibCore: Add "static bool Core::File::exists(filename)"
2020-02-12 21:17:00 +01:00
Andreas Kling
0cdf68f668
LibGUI: Always unhighlight table view column headers when cursor leaves
...
If the cursor left a table view column header while also pressing it,
we would keep the header highlighted. This was not consistent with how
regular buttons behaved.
2020-02-12 19:35:25 +01:00
Andreas Kling
29aee5e0d6
LibGUI: Make last auto-sized widget in a BoxLayout fill remaining space
...
Since space is divided evenly between widgets with SizePolicy::Fill,
we were sometimes ending up with a couple of unused pixels after the
last widget (due to rounding.)
Fix this by always giving the slack pixels at the end to the very last
auto-sized widget in the layout.
This fixes an issue where it was sometimes possible to click on an
"unreachable" part of a Splitter widget. :^)
2020-02-12 14:05:50 +01:00