Commit graph

16 commits

Author SHA1 Message Date
Andreas Kling
686ee2bf04 LibGUI: Rename ModelClient::on_model_update() => model_did_update()
This follows the typical client callback naming scheme used elsewhere
and doesn't collide with the "on_foo" Function hook convention.
2020-08-13 20:18:11 +02:00
Andreas Kling
299824de73 LibGUI: Rename GUI::Image => GUI::ImageWidget
"Image" was a bit too vague, "ImageWidget" is obviously a widget of
some sort.
2020-07-23 17:31:08 +02:00
Andreas Kling
76523a3d2d LibGUI: Show the special home directory icon in GUI::FilePicker 2020-07-19 21:42:00 +02:00
Tom
6568765e8f LibGUI: Add parent window argument to FilePicker functions
Since FilePicker almost always should be modal, add the parent
window as mandatory first argument.
2020-07-16 16:10:21 +02:00
Tom
c8d3f8cdeb LibGUI: Add Options flags and OpenMultiple mode for FilePicker
If the application can't open more than one file, we should not
allow the user to select multiple.
2020-07-13 19:49:34 +02:00
Tom
b778804d20 LibGUI: Add ModelClient abstract class and allow registering clients
This solves a problem where the SortingProxyModel doesn't
receive the on_update call because other code overwrote
the handler later on.
2020-07-13 19:49:34 +02:00
Linus Groh
5acc457c06 LibGUI: Only show FilePicker preview pane on demand
FilePicker::set_preview() and FilePicker::clear_preview() now show and
hide the preview pane respectively.
2020-06-30 10:43:46 +02:00
Hüseyin ASLITÜRK
a8b0ad5cc6 LibGUI: Fix image preview size in FilePicker for large images
Image preview widget overflow to other widgets in FilePicker dialog when image is larger than 160px.  Also change the ImagePreview widget variable name for align to naming standards.
2020-06-27 12:57:30 +02:00
Hüseyin ASLITÜRK
56e82a2c07 FilePicker: Replace Label with Image component to show icons 2020-06-18 16:35:57 +02:00
Emanuele Torre
937d0be762 Meta: Add a script check the presence of "#pragma once" in header files
.. and make travis run it.

I renamed check-license-headers.sh to check-style.sh and expanded it so
that it now also checks for the presence of "#pragma once" in .h files.

It also checks the presence of a (single) blank line above and below the
"#pragma once" line.

I also added "#pragma once" to all the files that need it: even the ones
we are not check.
I also added/removed blank lines in order to make the script not fail.

I also ran clang-format on the files I modified.
2020-05-29 07:59:45 +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
c45e16f605 LibCore: Add StandardPaths thing to retrieve various standard locations
Fixes #1853.
2020-04-19 19:57:05 +02:00
Andreas Kling
b29ff7b821 LibGUI: Don't use Core::Object::add() to instantiate dialogs
Now that add() returns a WidgetType&, we can't rely on the parent of a
GUI::Dialog to still keep it alive after exec() returns. This happens
because exec() will call remove_from_parent() on itself before
returning.

And so we go back to the old idiom for creating a GUI::Dialog centered
above a specific window. Just call GUI::Dialog::construct(), passing
the "parent" window as the last parameter.
2020-03-04 21:04:06 +01:00
Andreas Kling
a5d7ea24e9 LibGUI: Use MultiView in FilePicker
This allows the user to switch between different view modes.

Fixes #1283.
2020-02-24 20:50:21 +01:00
Andreas Kling
2143da6434 LibGUI: Add forwarding header
This patch adds <LibGUI/Forward.h> and uses it a bunch.
It also dragged various header dependency reduction changes into it.
2020-02-16 09:41:56 +01:00
Andreas Kling
6a9cc66b97 LibGUI: Remove leading G from filenames 2020-02-06 20:33:02 +01:00
Renamed from Libraries/LibGUI/GFilePicker.h (Browse further)