Commit graph

1261 commits

Author SHA1 Message Date
Andreas Kling
9ab9f97464 Browser: Remove no-op from the BooksmarksBarWidget
Widget::child_widgets() is a *copy* of the list of child widgets. :^)
2020-04-23 14:10:32 +02:00
Jonathan Archer
0efb5b3a11 Desktop: Context menu option to open FileManager 2020-04-23 11:22:32 +02:00
Jonathan Archer
3bbd7d9425 Desktop: Show DisplayProperties in context menu 2020-04-23 11:22:32 +02:00
Jonathan Archer
5457020d4e Desktop: File creation from the context menu
Kinda hackish, but it does work.
2020-04-23 11:22:32 +02:00
Jonathan Archer
d02c02cebe Desktop: Add context menu for directory view
Only has the option to create a folder, but hey ;^)
2020-04-23 11:22:32 +02:00
Brendan Coles
3c9693c6c7 IRCClient: Connect to IRC server URL specified in command line argument
The IRCClient application can now connect to a specified IRC server using
a URL with `irc://` protocol as a command line argument.
2020-04-23 09:50:19 +02:00
Brendan Coles
9ab4a8179a TextEditor: Add "Find Previous" 16x16 icon 2020-04-22 17:14:36 +02:00
Andreas Kling
09138d542d FileManager: Fix build 2020-04-22 12:38:33 +02:00
angel
0d47ad7efe FileManager: Exit the application cleanly when failing to open initial directory
Co-Authored-By: Andreas Kling <kling@serenityos.org>
2020-04-22 12:12:32 +02:00
angel
cc424b7b0f FileManager: Graceful handling of access errors
A neat error message is displayed when failing to open a directory!
2020-04-22 12:12:32 +02:00
Andreas Kling
0fa7cf70b5 WindowServer+SystemMenu: Check the current system theme on startup 2020-04-21 18:40:52 +02:00
Andreas Kling
b6d035aa05 SystemMenu: Make the system theme menu items checkable (and exclusive) 2020-04-21 17:50:20 +02:00
Andreas Kling
705cee528a LibGUI: Make it easier to create checkable GUI::Actions
This patch adds GUI::Action::create_checkable() helpers that work just
like the existing create() helpers, but the actions become checkable(!)

Clients are no longer required to manage the checked state of their
actions manually, but instead they will be checked/unchecked as needed
by GUI::Action itself before the activation hook is fired.
2020-04-21 17:21:28 +02:00
Andreas Kling
52a250cb61 LibGUI: Make MenuBar a Core::Object
This makes it show up in Inspector with all the menus inside it. :^)
2020-04-21 16:19:18 +02:00
Nicolas Van Bossuyt
6a66207efa
PaintBrush: Initial support for transparency. (#1883) 2020-04-21 12:03:58 +02:00
Brendan Coles
a47b9fe490 TextEditor: Add "Find Next" 16x16 icon 2020-04-21 09:49:47 +02:00
Itamar
e35219b5ce Debugger: Add source-level operations
- Print current source location, if available
- Add a breakpoint at a source location
- "sl" command - step to the next line in source
2020-04-20 17:25:50 +02:00
angel
e0a16f8752 FileManager+LibGUI: Allow drop on entire DirectoryView
Previously, drag and drop would only work when dragging between node
items on a DirectoryView. This commit makes it possible to drag files to
the empty area of the DirectoryView and copy files more easily between
windows.
2020-04-20 12:15:26 +02:00
angel
27091d05ee DirectoryView: Don't push same path twice to history
When opening a path, check if it's the current one before pushing it
twice to the path history.
2020-04-20 12:15:26 +02:00
Andreas Kling
c45e16f605 LibCore: Add StandardPaths thing to retrieve various standard locations
Fixes #1853.
2020-04-19 19:57:05 +02:00
Nicolas Van Bossuyt
b07bd1b95c
PaintBrush: Fix crash with flood fill. (#1881)
Fixed a crash occurring when initiating a flood fill out of the bitmap rectangle.
2020-04-19 19:29:07 +02:00
angel
238afd37cf FileManager: Replicate permissions on directory copy (#1437)
When copying files, the original file permissions are applied to the
copy. However, this was not done with directories. This should do it.
2020-04-19 17:18:27 +02:00
angel
11054fc9f9 FileManager: Fix recursive copy on drag
When a drag operation is accepted, we don't check whether the source
nodes contain the destination directory. This could trigger an unwanted
recursive copy.
2020-04-19 17:16:08 +02:00
angel
0ec37c0d64 FileManager: Ignore empty selections on tree view
If the selection is empty, the model index will be invalid and the file
system model will return the root directory path by default. This causes
the file manager to jump to the root directory when the currently
selected item on the tree view is deselected.
2020-04-19 15:23:16 +02:00
Vojtech Moravec
90f8a7a36b
Browser: Make removal of bookmark persistent (#1865)
Json model wasn't stored after bookmark removal.
Store the model if remove() was successful.
2020-04-19 14:43:16 +02:00
Sergey Bugaev
eacde6c499 Browser: Fix opening non-file URLs passed in argv 2020-04-19 11:14:26 +02:00
Sergey Bugaev
f8b2a7b4a7 LibCore+LibGUI: Move DesktopServices to LibCore 2020-04-19 11:14:26 +02:00
Andreas Kling
7dbb8b6f09 FileManager: Allow running in desktop mode
FileManager can now be started with the --desktop argument. When it's
started in this mode, it will run as a WindowType::Desktop window and
not create any of its regular UI.

The desktop version of the file manager is currently pretty bare-bones
but we can improve it over time and share more code with the regular
file manager windows.

I think this is pretty cool! :^)
2020-04-18 22:04:41 +02:00
Andreas Kling
d42e380906 FileManager: Use URL::create_with_file_protocol() in one place 2020-04-18 22:03:05 +02:00
Andreas Kling
afb9ee2af8 Browser: Use URL::create_with_file_protocol() in one place 2020-04-18 22:02:41 +02:00
Andreas Kling
75daf3857b FileManager: Use GUI::DesktopServices::open() to open files
Instead of squirreling away this logic deep in the FileManager app,
we now delegate file opening to GUI::DesktopServices.
2020-04-18 21:58:04 +02:00
Brendan Coles
e87347e1d3 IRCClient: Use sub-menus for app channel menu and member context menu 2020-04-18 19:49:05 +02:00
Andreas Kling
638130591c Taskbar: Remove frame around quick-launch icons 2020-04-18 18:22:37 +02:00
Itamar
1642fdf82d Debugger: Use LibLine 2020-04-16 12:22:59 +02:00
Itamar
f4418361c4 Userland: Add "functrace" utility
functrace traces the function calls a program makes.
It's like strace, but for userspace.

It works by using Debugging functionality to insert breakpoints
at call&ret instructions.
2020-04-16 11:17:33 +02:00
Andreas Kling
0e10673c58 Piano: Use NumericLimits<T> 2020-04-15 16:58:46 +02:00
Hüseyin ASLITÜRK
abd09ab030
DisplayProperties: Make the preview calculation more accurate (#1807) 2020-04-15 16:40:46 +02:00
Nick Tiberi
e639c5bc25 Browser: Default page title to URL if no title is provided 2020-04-15 08:39:11 +02:00
Sergey Bugaev
f18d6610d3 Kernel: Don't include null terminator in sys$readlink() result
POSIX says, "Conforming applications should not assume that the returned
contents of the symbolic link are null-terminated."

If we do include the null terminator into the returning string, Python
believes it to actually be a part of the returned name, and gets unhappy
about that later. This suggests other systems Python runs in don't include
it, so let's do that too.

Also, make our userspace support non-null-terminated realpath().
2020-04-14 18:40:24 +02:00
Itamar
109c24ae97 Debugger: Repeat previous command when an empty command is entered 2020-04-13 23:20:59 +02:00
Itamar
312559b131 Debugger: Add single step command
Also, this commit does some refactoring to the debugging loop logic.
2020-04-13 23:20:59 +02:00
Itamar
c3faaeb9b9 Debugger: Breakpoints now persist after being tripped
Previously, a breakpoint was removed after it was tripped.

After a breakpoint trips, we have to undo the 'int3' patch
from the instruction in order to continue the exceution.

To make a breakpoint persist, we switch to "single step" mode,
which stops the execution after a single instruction, and then we
insert the breakpoint at the previous instruction.

There is also some code that deals with an edge case where there are
breakpoints in two consecutive instructions.
2020-04-13 23:20:59 +02:00
Itamar
1191ab9500 Debugger: Print where we're stopped at
For some reaason, some magic is required to convince gcc to give us
the implementation for "__cxa_demangle"
Thanks @predmond for finding this simpler form of magic :)
2020-04-13 23:20:59 +02:00
Itamar
e207de8449 LibELF: Add find_demangled_function
Also, added AK::String::index_of and fixed a bug in ELF::Loader::symbol_ptr
2020-04-13 23:20:59 +02:00
Itamar
479348c9e7 Debugger: Add pledges 2020-04-13 00:53:22 +02:00
Itamar
3e9a7175d1 Debugger: Add DebugSession
The DebugSession class wraps the usage of Ptrace.
It is intended to be used by cli & gui debugger programs.

Also, call objdump for disassemly
2020-04-13 00:53:22 +02:00
Itamar
9e51e295cf ptrace: Add PT_SETREGS
PT_SETTREGS sets the regsiters of the traced thread. It can only be
used when the tracee is stopped.

Also, refactor ptrace.
The implementation was getting long and cluttered the alraedy large
Process.cpp file.

This commit moves the bulk of the implementation to Kernel/Ptrace.cpp,
and factors out peek & poke to separate methods of the Process class.
2020-04-13 00:53:22 +02:00
Itamar
0431712660 ptrace: Stop a traced thread when it exists from execve
This was a missing feature in the PT_TRACEME command.

This feature allows the tracer to interact with the tracee before the
tracee has started executing its program.

It will be useful for automatically inserting a breakpoint at a
debugged program's entry point.
2020-04-13 00:53:22 +02:00
Itamar
b306ac9b2b ptrace: Add PT_POKE
PT_POKE writes a single word to the tracee's address space.

Some caveats:
- If the user requests to write to an address in a read-only region, we
temporarily change the page's protections to allow it.

- If the user requests to write to a region that's backed by a
SharedInodeVMObject, we replace the vmobject with a PrivateIndoeVMObject.
2020-04-13 00:53:22 +02:00
Itamar
924fda19b0 Debugger: Get entry point of debugged process
Also, start debugging only after execve is done
2020-04-13 00:53:22 +02:00
Itamar
984ff93406 ptrace: Add PT_PEEK
PT_PEEK reads a single word from the tracee's address space and returns
it to the tracer.
2020-04-13 00:53:22 +02:00
Itamar
77f671b462 CPU: Handle breakpoint trap
Also, start working on the debugger app.
2020-04-13 00:53:22 +02:00
Hüseyin ASLITÜRK
b1e8cc22bd QuickShow: Small code edits to fit standards 2020-04-12 18:08:11 +02:00
Hüseyin ASLITÜRK
70873fdf02 QuickShow: Toolbar for who love to use mouse 2020-04-12 18:08:11 +02:00
Hüseyin ASLITÜRK
6c1af174a1 QuickShow: Add Delete action
Delete current file from file system.
2020-04-12 18:08:11 +02:00
Hüseyin ASLITÜRK
f88ceb872a QuickShow: Use Core::ArgsParser to handle parameters 2020-04-12 18:08:11 +02:00
Hüseyin ASLITÜRK
e0bf57d81f QuickShow: Add Fullscreen, Zoom options to View menu 2020-04-12 18:08:11 +02:00
Hüseyin ASLITÜRK
d79c81a179 QuickShow: Rotate image left and right, flip vertical and horizontal 2020-04-12 18:08:11 +02:00
Hüseyin ASLITÜRK
2689fdf1d8 QuickShow: Browse the files in the same folder 2020-04-12 18:08:11 +02:00
Andreas Kling
8e4751a963 LibGUI: Add a way for models to update without invalidating indexes
This is really just a workaround to keep SystemMonitor's process table
working right wrt selection retention during resorts (while also doing
full index invalidation on things like ProfileViewer inversion.)

It's starting to feel like the model abstraction is not super great
and we'll need a better approach if we want to actually build some more
dynamic functionality into our views.
2020-04-12 12:03:33 +02:00
Andreas Kling
8ef9c272b6 Browser: Accept file:// URLs on the command line
This could be a lot nicer, but at least we can open file:// URLs now.
2020-04-11 23:11:10 +02:00
Brendan Coles
502299919a IRCClient: Add channel member context menus for common CTCP requests
Add menu items for CTCP: USERINFO, FINGER, TIME, VERSION, CLIENTINFO
2020-04-11 14:26:36 +02:00
Brendan Coles
63f8cbfb56 IRCClient: Add NotifyOnMessage/NotifyOnMention config options
Allow IRCClient user to opt out of notifications.
2020-04-10 13:16:07 +02:00
Brendan Coles
df7b617ba1 IRCClient: Add ShowNickChangeMessages/ShowJoinPartMessages conf options
Allow IRCClient to hide nick change spam and join/part spam
2020-04-10 12:56:19 +02:00
Brendan Coles
68c7ca7d3b IRCClient: Autojoin channels after client registration
Wait for the server to advise negotiation was successful (RPL_WELCOME)
before autojoining channels.

Fixes #1713
2020-04-10 11:29:46 +02:00
rhin123
cd84544706 Calendar: Implement add event action 2020-04-10 11:28:34 +02:00
rhin123
06604c3786 Calendar: Implement add event UI 2020-04-10 11:28:34 +02:00
Hüseyin ASLITÜRK
870936085a DisplayProperties: Replace TextBox with ColorInput.
Use new ColorInput component. Delete unnecessary code lines. Fix local variable names.
2020-04-10 11:25:49 +02:00
Brendan Coles
d95362d8cd IRCClient: Set nick and userinfo to OS username when not set in config 2020-04-09 17:18:56 +02:00
rhin123
bdb6b2ced3 Calendar: Corrected spacing on small resizing 2020-04-09 08:38:35 +02:00
Brendan Coles
5c90cfa90f IRCClient: Add application and context menu items to hop/dehop users 2020-04-08 19:53:40 +02:00
Brendan Coles
e4ba949a15 IRCClient: Open query on double click of nick in channel member list 2020-04-08 18:42:01 +02:00
Brendan Coles
036fb4c621 IRCClient: Add nick_without_prefix and nick_at helpers
`IRCChannelMemberListModel->nick_at` returns the nick name of a channel
member at the specified index.

`IRCClient->nick_without_prefix` returns a formatted nick name without
privilege prefix.
2020-04-08 18:42:01 +02:00
Brendan Coles
44f8161166 IRCClient: Remove FIXME for RPL_TOPICWHOTIME
RPL_TOPICWHOTIME is handled by handle_rpl_topicwhotime.
2020-04-08 14:06:03 +02:00
Brendan Coles
9126859679 IRCClient: Rename /hop command to /cycle
Some IRC clients use /hop to part and re-join a channel; however this
can be confused with granting half-op (+h) channel privileges to a user.

The general convention used by other IRC clients is /cycle.
2020-04-08 11:42:05 +02:00
rhin123
e91cb83a23 Calendar: Make the application theme-aware 2020-04-08 10:34:20 +02:00
Brendan Coles
0f91045008 IRCClient: Add right-click context menu to IRCWindow member list 2020-04-07 21:27:06 +02:00
Liav A
7cda0b9027 SystemMonitor: Replace 'device' JSON field with 'source' 2020-04-06 15:36:36 +02:00
Tibor Nagy
63b11e094d QuickShow: Miscellaneous improvements
Major changes are:

The layout and mouse handling has been rewritten to always center
images in the window.

QuickShow now accepts multiple images on drag and drop. The first
image gets opened in the current window, further images are opened in
new processes.

QSWidget now loads images on its own with QSWidget::load_from_file().

An on_drop callback has been introduced for QSWidget.

Added an open menu.

Added an about box and placeholder icons to the application.

QuickShow now starts without loading the sunset-retro wallpaper.
2020-04-06 09:04:15 +02:00
Oriko
2c5faa8ff3 FileManager: Add properties action to directory context menu 2020-04-05 16:02:07 +02:00
Tibor Nagy
a4f6f8e0e7 QuickShow: Use checkerboard background to show transparency 2020-04-05 15:30:53 +02:00
Brendan Coles
ddb8597c0c IRCClient: Allow CTCP replies to be user configurable in IRCClient.ini 2020-04-05 15:29:48 +02:00
Brendan Coles
a1b57216b8 IRCClient: Add handling for server responses and BANLIST command 2020-04-05 12:49:33 +02:00
Andreas Kling
1d468ed6d3 AK: Stop allowing implicit downcast with RefPtr and NonnullRefPtr
We were allowing this dangerous kind of thing:

RefPtr<Base> base;
RefPtr<Derived> derived = base;

This patch changes the {Nonnull,}RefPtr constructors so this is no
longer possible.

To downcast one of these pointers, there is now static_ptr_cast<T>:

RefPtr<Derived> derived = static_ptr_cast<Derived>(base);

Fixing this exposed a ton of cowboy-downcasts in various places,
which we're now forced to fix. :^)
2020-04-05 11:19:00 +02:00
Brendan Coles
4ea71c9571 IRCClient: Add support for raw protocol commands with /RAW 2020-04-05 10:39:36 +02:00
Brendan Coles
55b25b3c9b IRCClient: Add icons for channel list, channel invite, channel topic 2020-04-05 09:37:19 +02:00
Tibor Nagy
192513ec33 QuickShow: Fix crash on startup
QSWidget::relayout get triggered before setting a bitmap to display
while setting the widget as the main widget of the window.

I've added a null check to the paint event too to make sure the
widget works with no bitmap set.
2020-04-05 09:36:46 +02:00
Andreas Kling
26eeaef0a8 LibGUI: Add MenuBar::add_menu(name)
This allows us to construct menus in a more natural way:

    auto& file_menu = menubar->add_menu("File");
    file_menu.add_action(...);

Instead of the old way:

    auto file_menu = GUI::Menu::construct();
    file_menu->add_action(...);
    menubar->add_menu(file_menu);
2020-04-04 12:58:05 +02:00
Brendan Coles
8780151155 Browser: Add Reload option to app menu with F5 shortcut key 2020-04-04 11:47:03 +02:00
Andreas Kling
2463a285ee LibGUI: Make GUI::TabWidget::add_tab<T>() return a T&
Since the newly constructed sub-widget is owned by the TabWidget,
we can simply return a T& here. :^)
2020-04-04 11:10:07 +02:00
Andreas Kling
28be90120b Revert "SystemMonitor: Replace 'device' JSON field with 'source'"
This reverts commit 592f218151.

Reverting these changes since they broke things.
Fixes #1608.
2020-04-03 21:28:25 +02:00
Brendan Coles
40b3203941 IRCClient: Update channel user list when a user joins or quits 2020-04-02 21:50:02 +02:00
Brendan Coles
6bf47252dc IRCClient: Add is_channel_prefix to check if string is a channel name 2020-04-02 15:39:57 +02:00
Brendan Coles
526386a6ba IRCClient: Automatically disable/enable GUI actions upon window change
Toolbar and menu items related to channel operations are now enabled
only when the active window is a channel.
2020-04-02 15:07:32 +02:00
Brendan Coles
855f9286fa IRCClient: Add channel operations to Channel application menu
Add menu options to invite user, op/deop/voice/devoice user,
and cycle channel.
2020-04-02 14:39:05 +02:00
Liav A
592f218151 SystemMonitor: Replace 'device' JSON field with 'source' 2020-04-02 12:03:08 +02:00
Brendan Coles
b3d8ce44a2 IRCClient: Use active channel window for part,hop,topic,kick commands
The /part, /hop, /topic, /kick commands will now default to the
currently active window if no channel name was provided.
2020-04-02 08:54:54 +02:00
Brendan Coles
175ec99814 IRCClient: Add Channel application menu and LIST and KICK commands
The new Channel application menu allow offers various commands
related to the currently visible channel, including changing
the topic, kicking a user, and leaving the channel.
2020-04-01 13:11:46 +02:00
Brendan Coles
2de2f49abc IRCClient: Add support for /HOP and /TOPIC commands 2020-03-31 18:06:30 +02:00
Andreas Kling
297e6625f3 Browser: Refuse to run as root 2020-03-31 13:02:05 +02:00
Andreas Kling
b2b5da8a17 IRCClient: Refuse to run as root
There's no good reason to allow this, and some pretty great reasons
to disallow it. :^)
2020-03-31 13:02:05 +02:00
Tibor Nagy
c56acba75e SoundPlayer: Set parent window for AboutDialog 2020-03-30 10:52:09 +02:00
Tibor Nagy
7a61ed4178 Taskbar: Show default window icons when no icons are set
To be consistent with WindowServer.
2020-03-30 10:52:09 +02:00
Andreas Kling
7cfe712f4d LibGfx+LibIPC: Add Gfx::ShareableBitmap, a bitmap for easy IPC usage
With this patch, it's now possible to pass a Gfx::ShareableBitmap in an
IPC message. As long as the message itself is synchronous, the bitmap
will be adopted by the receiving end, and disowned by the sender nicely
without any accounting effort like we've had to do in the past.

Use this in NotificationServer to allow sending arbitrary bitmaps as
icons instead of paths-to-icons.
2020-03-29 19:37:23 +02:00
Hüseyin ASLITÜRK
7971af474d DisplayProperties: Add options to set the background color and wallpaper mode.
Wallpaper mode and background color change options are now available. Monitor preview
widget show new settings before apply. We have some missing preview features :(
2020-03-29 19:36:37 +02:00
Tibor Nagy
70dc80fa47 SystemMenu: Sort applications alphabetically 2020-03-29 14:58:26 +02:00
Emanuel Sprung
c9059c12dc Browser: Let the user add/remove bookmarks to the bookmarks bar
This patchset adds a Button to the toolbar (right next to the location field)
with a star icon. The star is white if the currently visited url is not yet
bookmarked and yellow if a bookmark for the url exists.

After adding or removing a bookmark, the bookmark json file is synced to disk.
Therefore, some new pledge/unveil's have been added.
2020-03-27 14:12:18 +01:00
Emanuel Sprung
337ade9e4c Browser: Add bookmarks bar
This patchset adds a bookmark bar that is backed by a json file backend.
The json file is loaded and checked for the format. According to the
format, the bookmarks bar is populated with the bookmark items.

If the bookmarks do not fit into one line, an expader button is shown
that brings up a menu containing the missing bookmark items.

There is currently no way to add or remove bookmarks. A hover over a
bookmark is also not yet showing the url in the statusbar.
2020-03-27 14:12:18 +01:00
Emanuel Sprung
a9e943ae4c Browser: Add empty, toogleable bookmarks bar 2020-03-27 14:12:18 +01:00
Andreas Kling
d52c5a94b4 IRCClient: Use the IRCClient app icon in notifications :^) 2020-03-26 20:39:36 +01:00
Andreas Kling
3c29818048 IRCClient: Only notify about channel messages containing our nickname 2020-03-26 20:18:22 +01:00
Andreas Kling
163812df97 IRCClient: Post desktop notifications when messaged while inactive
If you receive a channel or query message while the app is inactive,
or while the channel/query is inactive, we now post a desktop
notification so you can learn that something is happening. :^)
2020-03-26 20:11:23 +01:00
Nick Tiberi
ca067e71a3
Taskbar: Remove FIXME re: tooltip rendering since it's now working (#1502) 2020-03-23 08:21:34 +01:00
rhin123
073ac3a22f Calendar: Add license header 2020-03-19 22:54:30 +01:00
rhin123
8bc412c80b Calendar: Add a 16x16 app icon 2020-03-19 22:54:30 +01:00
rhin123
19e1cd9fb8 Calendar: Corrected spacing for widgets and rectangles 2020-03-19 22:54:30 +01:00
Tibor Nagy
fc71b73c37 Applications: Remove G prefixes from comments 2020-03-19 22:52:44 +01:00
rhin123
6d26714ded Calendar: Allow the widget to resize with the window 2020-03-19 09:55:14 +01:00
rhin123
5744049b74 Calendar: Make const arrays static as well 2020-03-19 09:55:14 +01:00
rhin123
dc680d57aa Calendar: Don't assign next_month button variable to add_event button 2020-03-19 09:55:14 +01:00
Andreas Kling
47fdac7cea Browser: Fix unintentional Web::Element copy 2020-03-18 17:13:22 +01:00
Itamar
d98fbd192e Terminal: Remove working directory argument
Applications that want to spawn Terminal in a specific
directory should chdir to it before execing it.
2020-03-18 08:23:31 +01:00
Itamar
c18f12bb96 Taskbar: chdir to home directory before launching apps 2020-03-18 08:23:31 +01:00
Itamar
e2b7e7c390 SystemMenu: chdir to home directory before launching apps 2020-03-18 08:23:31 +01:00
Itamar
a4497ce375 FileManager: chdir to appropriate directory before starting Terminal 2020-03-18 08:23:31 +01:00
rhin123
39c21f368a Calendar: Implement basic GUI calendar application 2020-03-18 08:17:01 +01:00
Alex Muscar
838d1c38a1 SystemMenu: Remove the unveil() call for /etc/PowerOptions.ini
The file is not used.
2020-03-16 11:05:48 +00:00
Itamar
45d7ea1b63 FileManager: Add "Open Terminal here" action 2020-03-15 19:09:24 +01:00
Itamar
bbe50577f8 Terminal: Add -d option for specifying working directory 2020-03-15 19:09:24 +01:00
Andreas Kling
9c9d3f0904 LibWeb: Parse <script> elements and run any JavaScript found inside
This patch begins integrating LibJS into LibWeb. Document holds the
JS::Interpreter for now, and it is created on demand when you first
call Document::interpreter().

We also add a simple "alert()" function to the global object.
2020-03-14 13:25:38 +01:00
Tibor Nagy
f347dd5c5e Applications: Use "Document - AppName" window title format
Fixes #1444
2020-03-13 23:30:12 +01:00
Oriko
c2884d29d6 TextEditor: Use Javascript syntax highlighter 2020-03-13 22:53:13 +01:00
Tibor Nagy
fa98bbfda5 Terminal: Make the settings window unresizable 2020-03-11 10:12:25 +01:00
Oriko
75672263ce TextEditor: Quit after saving unsaved changes on close event. 2020-03-11 10:11:48 +01:00
Oriko
cb39327b1c TextEditor: Add syntax toggle to View menu 2020-03-11 10:05:01 +01:00
Andreas Kling
37fc6c117c Userspace: Add missing #includes now that AK/StdLibExtras.h is smaller 2020-03-08 13:06:51 +01:00
Andreas Kling
830a57c6b2 LibWeb: Rename directory LibHTML => LibWeb
Let's rename this to LibWeb since it aims to provide more parts of the
web platform than just HTML. :^)
2020-03-07 10:32:51 +01:00
Andreas Kling
7a6c4a72d5 LibWeb: Move everything into the Web namespace 2020-03-07 10:27:02 +01: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
Tibor Nagy
c982bfee7e FileManager: Fix asserts on checking properties of symlinks
There were two issues with this code:
- The result of the readlink() call was checked incorrectly for errors.
- This code shouldn't return because otherwise it leaves the GUI buttons
  uninitialized below, causing RefPtr asserts to trigger when the dialog
  tries to access the buttons later on.
2020-03-05 19:04:14 +01:00
Tibor Nagy
90ef6be535 FileManager: Fix group names in the file properties dialog 2020-03-05 16:36:05 +01: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
028c011760 LibCore: Make Core::Object::add<ChildType> return a ChildType&
Since the returned object is now owned by the callee object, we can
simply vend a ChildType&. This allows us to use "." instead of "->"
at the call site, which is quite nice. :^)
2020-03-04 21:04:06 +01:00
Andreas Kling
0f3e57a6fb LibGUI: Use GUI::Window::set_main_widget<WidgetType>() in clients 2020-03-04 14:26:16 +01:00
Andreas Kling
4697195645 LibGUI: Use set_layout<LayoutType>() in lots of client code 2020-03-04 13:49:48 +01:00
Andreas Kling
03e0ddce52 LibGUI: Some more convenience functions for constructing widgets
This patch adds two new API's:

- WidgetType& GUI::Window::set_main_widget<WidgetType>();

  This creates a new main widget for a window, assigns it, and returns
  it to you as a WidgetType&.

- LayoutType& GUI::Widget::set_layout<LayoutType>();

  Same basic idea, creates a new layout, assigns it, and returns it to
  you as a LayoutType&.
2020-03-03 22:37:48 +01:00
Andreas Kling
a26b63a958 LibGUI: Remove Button& parameter from Button::on_click hook
There was but a single user of this parameter and it's a bit tedious
to write it out every time, so let's get rid of it.
2020-03-03 17:02:38 +01:00
Andreas Kling
b1d35248e4 SystemMenu: Fix bad behavior in shutdown dialog
The selected option was stored in a captured stack variable which was
long gone by the time we looked at it, so this dialog didn't really
behave the way you'd expect. Put it in a member instead. :^)
2020-03-03 16:46:39 +01:00
Andreas Kling
686ade6b5a AK: Make quick_sort() a little more ergonomic
Now it actually defaults to "a < b" comparison, instead of forcing you
to provide a trivial less-than comparator. Also you can pass in any
collection type that has .begin() and .end() and we'll sort it for you.
2020-03-03 16:02:58 +01:00
Andreas Kling
2719d6d502 SystemMonitor: Unbreak the in-table progress bars showing disk usage 2020-03-02 23:05:04 +01:00