Andreas Kling
13d7c09125
Libraries: Move to Userland/Libraries/
2021-01-12 12:17:46 +01:00
asynts
843ebbd2c3
Everywhere: Replace a bundle of dbg with dbgln.
...
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-11 21:49:29 +01:00
Andreas Kling
7baaa34490
LibGUI: Make SortingProxyModel proxy accepts_drag()
2021-01-09 12:02:07 +01:00
Andreas Kling
67b91d51a7
WindowServer+LibGUI: Pass the set of mime types being dragged to client
...
Previously the client would only learn the mime type of what was being
dropped on it once the drop occurred. To enable more sophisticated
filtering of drag & drop, we now pass along the list of mime types being
dragged to the client with each MouseMove event.
(Note that MouseMove is translated to the various Drag* events in LibGUI
on the client side.)
2021-01-09 12:02:07 +01:00
Andreas Kling
f181ddb56a
LibGUI: Use String::formatted() and String::number() more
2021-01-03 14:52:50 +01:00
Linus Groh
5b68ea8dde
LibGfx: Make Bitmap path handling case insensitive
...
Bitmap::is_path_a_supported_image_format() and Bitmap::load_from_file()
now check the file extension with CaseSensitivity::CaseInsensitive.
This fixes a couple of inconsistencies, for example would
FileSystemModel::icon_for() recognize image files uppercase extensions
but couldn't create thumbnails for them (any attempt to create a bitmap
from such files would fail).
2020-11-14 10:11:26 +01:00
AnotherTest
6d1e47e7dd
LibGUI+WindowServer: Make DragOperation hold a MimeData instance
...
...instead of maybe bitmap + a single mime type and its corresponding data.
This allows drag&drop operations to hold multiple different kinds of
data, and the views/applications to choose between those.
For instance, Spreadsheet can keep the structure of the dragged cells,
and still provide text-only data to be passed to different unrelated editors.
2020-11-08 21:46:13 +01:00
Tom
52a847a0eb
LibGUI: Implement searching/jumping as you type in views
...
This allows the user to start typing and highlighting and jumping
to a match in ColumnsView, IconView, TableView and TreeView if
the model supports it.
2020-10-22 15:23:45 +02:00
Andreas Kling
701787b906
LibGUI: Support editing filenames through FileSystemModel :^)
2020-09-24 11:30:14 +02:00
Andreas Kling
76ae47c6ed
LibGUI: Unbreak FileSystemModel::index(path) after virtual root changes
...
Now that the "/" directory can have a (virtual) parent index, we need
to account for that when converting a full path to a model index.
2020-09-18 21:29:01 +02:00
Andreas Kling
e4c23b0151
iLibGUI+Base: Show inaccessible directories with special icon in views
2020-09-18 21:29:01 +02:00
Andreas Kling
fad6b8f267
LibGUI: FileSystemModel should provide full paths to FileIconProvider
...
This will allow FileIconProvider to check additional things about
the specified path. (We previously only had access to the basename.)
2020-09-18 21:29:01 +02:00
Andreas Kling
31b65145b6
LibGUI+Base: Add a hard-disk icon and use it for the path "/"
2020-09-16 21:08:55 +02:00
Andreas Kling
4d2782db5a
LibGUI: Allow FileSystemModel to be rooted one level above "/"
...
You can now construct a FileSystemModel with a null String() as the
root path. This will root it one level above "/" which makes the
root directory itself selectable as a child.
This will be useful in some places, e.g the FileManager application.
2020-09-16 21:08:55 +02:00
Andreas Kling
f0349323c4
LibGUI: Don't require passing model to FileSystemModel::Node APIs
...
The Node API was obnoxiously requiring you to pass the model into it
all the time, simply because nodes could not find their way back to
the containing model. This patch adds a back-reference to the model
and simplifies the API.
2020-08-17 22:02:21 +02:00
Andreas Kling
a1e381a0f8
LibGUI: Move GUI::Model::Role to GUI::ModelRole
...
This is preparation for using ModelRole in the ModelIndex API.
2020-08-16 16:44:09 +02:00
Andreas Kling
3dd15da7b1
LibGUI: Move file icon lookup into a separate FileIconProvider
...
Let's get it out of FileSystemModel so you can look up a nice icon for
a path without needing a model.
2020-08-12 20:41:13 +02:00
Andreas Kling
dc696ba85c
LibGUI: Show a special icon for the home directory in FileSystemModel
2020-07-19 21:37:19 +02:00
Andreas Kling
9710c9742c
LibGUI+FileManager: Add setting for showing/hiding dotfiles
...
GUI::FileSystemModel can now be told to display (or not display) files
whose name start with a dot (other than . and ..)
2020-07-19 21:15:00 +02:00
Sergey Bugaev
5fd8dbacb1
LibGUI+FileManager: Fix forgetting to map sorting proxy model indexes
...
Also assert indexes are valid in a few more places.
Finally fixes https://github.com/SerenityOS/serenity/issues/1440 and
https://github.com/SerenityOS/serenity/issues/2787 :^)
2020-07-15 13:41:46 +02:00
thankyouverycool
deceb91c48
FileManager: Show an open folder icon for the selected directory
...
The currently selected directory now displays an open folder icon
in the directory tree.
2020-07-10 19:44:18 +02:00
Andreas Kling
0b9efc04b5
LibGUI: Sort FileSystemModel alphabetically internally
...
This just makes everything nicer.
2020-07-04 20:33:23 +02:00
Sergey Bugaev
0674d9362b
LibGUI: Use Core::File::read_link()
2020-06-17 15:02:03 +02:00
Hüseyin ASLITÜRK
0799835e15
LibGUI: Use new Bitmap::is_path_a_supported_image_format method
2020-06-15 22:42:23 +02:00
Andreas Kling
116cf92156
LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize
...
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much
better visual clue about what type of metric is being used.
2020-06-10 10:59:04 +02:00
Sergey Bugaev
602c3fdb3a
AK: Rename FileSystemPath -> LexicalPath
...
And move canonicalized_path() to a static method on LexicalPath.
This is to make it clear that FileSystemPath/canonicalized_path() only
perform *lexical* canonicalization.
2020-05-26 14:35:10 +02:00
Andreas Kling
2adb0a07e5
LibGUI: Get rid of Model::ColumnMetadata and always use auto-sizing
...
Auto-sizing of view columns is now enabled by default. This removes the
last remaining need for ColumnMetadata, so this patch gets rid of it.
2020-05-21 19:55:44 +02:00
Andreas Kling
c666c251c8
LibGUI: Replace ColumnMetadata::sortable => Model::is_column_sortable()
...
Now there's only one thing left in ColumnMetadata: the initial width.
2020-05-21 19:55:44 +02:00
Andreas Kling
2e03bded43
LibGUI: Add Model::Role::TextAlignment and remove from ColumnMetadata
2020-05-21 19:55:44 +02:00
Andreas Kling
04187576ff
LibGUI: Models should always specify font via Model::Role::Font
...
This gets rid of one field in ColumnData. The goal is to get rid of all
fields and lose ColumnData entirely.
2020-05-21 19:55:44 +02:00
Hüseyin ASLITÜRK
c9c1d1fae0
LibGUI: Create thumnail for gif files
2020-04-26 18:44:20 +02:00
Linus Groh
9de184d883
LibGUI: Use enumerator macros for filetype icons
2020-04-26 01:12:14 +02:00
angel
451b3fa73c
LibGUI: Added error events to FileSystemModel
...
This will allow us to catch errors early on FileManager
2020-04-22 12:12:32 +02:00
VAN BOSSUYT Nicolas
f85aa8462f
LibGUI: Thumbnail keep the aspect ratio of the original file.
2020-04-07 21:27:31 +02:00
VAN BOSSUYT Nicolas
694e4e9168
Resources: Added filetype icon for object, library, text and unknown.
2020-04-07 21:27:31 +02:00
VAN BOSSUYT Nicolas
5d2bfbd20b
LibGUI: Added the new icons to FileSystemModel.
2020-04-06 14:44:09 +02:00
Shannon Booth
6a3b12664a
LibGUI: Move Icon and FontDatabase into the GUI namespace
...
We also clean up some old references to the old G prefixed GUI classes
This also fixes a potential bug with using: C_OBJECT_ABSTRACT(GAbstractButton)
instead of C_OBJECT_ABSTRACT(AbstractButton)
2020-03-07 01:33:53 +01:00
Shannon Booth
57f1c919df
LibCore: Remove all remaining C prefix references
...
LibCore's GZip is also moved into the Core namespace with this change.
2020-03-07 01:33:53 +01:00
Tibor Nagy
c69686f1b2
LibGUI: Fix group name columns in FileSystemModel
2020-03-05 16:36:05 +01:00
Andreas Kling
ceec1a7d38
AK: Make Vector use size_t for its size and capacity
2020-02-25 14:52:35 +01:00
Andreas Kling
814d59f462
LibGUI: Port the drag&drop code to Core::MimeData
2020-02-14 13:18:59 +01:00
Andreas Kling
8b3864c70a
LibGUI: Have FileSystemModel accept url-list drags onto directories
2020-02-13 21:48:32 +01:00
Andreas Kling
6a9cc66b97
LibGUI: Remove leading G from filenames
2020-02-06 20:33:02 +01:00