Commit Graph

304 Commits

Author SHA1 Message Date
Oleg Sikorskiy
ee64c814c6 QuickShow: Use a better formula for zooming.
Now the pixel under the cursor doesn't move, which is more consistent
with other image viewers (e.g. GwenView and IrfanView). Also switch
m_pan_origin to use window space to have less space transformations.
2021-03-15 22:46:53 +01:00
Cesar Torres
4f34a78337 TextEditor: Add charcount info about selected text to the statusbar 2021-03-15 09:08:15 +01:00
Linus Groh
4b65ba27ec Terminal: Create config file parent directories before unveil()'ing
Otherwise unveil() will fail, as even with "c" permissions the file's
parent directory must exist.

Fixes #5651.
2021-03-13 18:48:37 +01:00
Brendan Coles
f21af0922a QuickShow: Add help documentation 2021-03-13 10:00:59 +01:00
Brendan Coles
7b22fb70a2 Terminal: Add support for fullscreen view 2021-03-13 09:55:11 +01:00
Andreas Kling
ef1e5db1d0 Everywhere: Remove klog(), dbg() and purge all LogStream usage :^)
Good-bye LogStream. Long live AK::Format!
2021-03-12 17:29:37 +01:00
Brendan Coles
8c0723960b QuickShow: Replace posix_spawn with LibDesktop::Launcher
When multiple images are dragged and dropped onto the image widget,
QuickShow will use LibDesktop::Launcher to launch a new instance
of QuickShow for each item, rather than spawn a child QuickShow
process for each item with posix_spawn.

This allows `proc` and `exec` pledges to be removed :^)
2021-03-12 15:22:12 +01:00
Vyacheslav Pukhanov
4b99dbe644 FileManager: Accept TreeView drop event 2021-03-11 18:54:52 +01:00
Ben Wiederhake
bceb98e2df Userland: Remove superfluous headers
Userland has no reason to access 'kmalloc'.
2021-03-11 12:32:53 +01:00
Andreas Kling
16cde3f14a LibWeb: Rename CSSParser => DeprecatedCSSParser 2021-03-09 17:35:57 +01:00
Linus Groh
a0362d827c FileManager: Disable view change actions when directory is unreadable
Closes #3556.
2021-03-07 16:19:36 +01:00
thankyouverycool
1ccf9de6b9 Serendipity: Couple more tips and some clean-up 2021-03-07 15:41:32 +01:00
Andreas Kling
2d7d5f2b55 Serendipity: Make main window a normal window
..instead of a tool window. Tool windows are meant as accessories to
an application's main/primary windows, not to be primary windows
themselves.

Fixes #5667.
2021-03-07 14:19:20 +01:00
Andreas Kling
1375c57c4a Serendipity: Simplify GML and fix button alignment 2021-03-07 14:12:23 +01:00
supercyp
a6f957a36b
Serendipity: Make main window resizable (#5675)
If it is not resizable, the "What's new" page may be hard to read.
2021-03-07 14:04:06 +01:00
speles
0071742a5a FileManager: Use ArgsParser, handle more options
This adds 2 more flags, that help with the "select on start" invocation.
-s - makes us open the parent directory of the entry, and select it.
-r - makes FileManager to skip real path resolution for cases when we
     want to select the symlink in parent directory.

Also, if the file path is passed as argument, not it will open parent
with the file selected.
2021-03-07 11:00:36 +01:00
speles
6e16a5cdfa Applications: Open folder with pre-selected file where appropriate :^) 2021-03-07 11:00:36 +01:00
thankyouverycool
2e5d5eb3d8 SystemMonitor: Return icon display data as GUI::Icons
And delete the generic icon member which has been dormant since
switching to FileIconProvider. Fixes icon column not being properly
painted as icon cells.
2021-03-04 16:28:12 +01:00
Zac
6d68ae45b4 FileManager: Add launch handler actions to desktop context menu
Extracted a method from the code in the File Manager application which
added actions for activating launch handlers found for the selected
file from the context menu. Applied this method to desktop files
and shortcuts.

Note: made some launch handler related methods in the DirectoryView
static or const which allows passing const DirectoryView& to certain
methods.
2021-03-03 21:53:01 +01:00
Andreas Kling
bcca3d4cdd Terminal: Stop pushing a PROMPT into the shell's environment
This isn't the terminal's responsibility.
2021-03-03 20:37:23 +01:00
Mart G
de9f458ff5 SpaceAnalyzer: Reduce thickness of black borders between cells.
-Adds take_from_{left,right,top,bottom} to Rect.
2021-03-02 14:46:06 +01:00
William McPherson
c7777ff289 Piano: Reset position in piano roll when exporting
When you reset() a Track, you need to set the piano roll iterators back
to the first notes.

Fixes #2578. The bug was due to pressing export between 2 notes - the
tracks were never told to go back to the first note.
2021-03-02 14:44:42 +01:00
thankyouverycool
71a123148a Serendipity: A new welcome app
Provides the basic Help+ReadMe care package to new users and some
interesting tips to get started. Feel free to add more!
2021-03-02 11:57:27 +01:00
Idan Horowitz
147d30ae4f Spreadsheet: Implement the cut operation for cells
This is done by adding another field to our custom
text/x-spreadsheet-data mime-type that specifies the
action (just copy/cut for now)
2021-03-01 11:37:02 +01:00
ry755
b474f49164 TextEditor: Add a command line option to jump to a specific line number 2021-03-01 11:18:14 +01:00
speles
0b5ca28475 FileManager: Focus on file when opening file's location from Properties 2021-03-01 11:16:18 +01:00
speles
e964d238b8 FileManager+LaunchServer: Add launching FileManager with focus on file 2021-03-01 11:16:18 +01:00
Brandon Scott
269ec8b1f9 Browser: Implemented out of process JS console
Added input hook into console widget to allow input to be captured and
sent to the external JS console via IPC.

Output from the external JS console is fed into the console widget
via handle_js_console_output().
2021-02-28 15:30:17 +01:00
Andreas Kling
2c1f71055f LibVT: Put TerminalWidget in the VT namespace :^) 2021-02-27 17:49:08 +01:00
Andreas Kling
6817d0701e TextEditor: Initialize menubar before opening initial file
Otherwise we can't toggle the syntax highlighting actions based on the
opened file (since the actions have not been created yet.)
2021-02-27 11:10:37 +01:00
Andreas Kling
28720e9035 TextEditor: Rename open_sesame() => open_file() 2021-02-27 11:05:39 +01:00
Linus Groh
e265054c12 Everywhere: Remove a bunch of redundant 'AK::' namespace prefixes
This is basically just for consistency, it's quite strange to see
multiple AK container types next to each other, some with and some
without the namespace prefix - we're 'using AK::Foo;' a lot and should
leverage that. :^)
2021-02-26 16:59:56 +01:00
thankyouverycool
1723eac40f TextEditor: Fix passing null parent to AboutDialog
Refactors menubar creation to avoid passing a null parent window
to AboutDialog during construction. Fixes #5177 in part
2021-02-26 13:50:00 +01:00
thankyouverycool
2481dbcc41 Terminal: Remove unnecessary ellipses and capitalize name in menu 2021-02-26 13:50:00 +01:00
thankyouverycool
132ca7e37b Spreadsheet: Merge File menu into 'Spreadsheet' app menu
This is the common convention among the other apps. Also remove
a superfluous separator
2021-02-26 13:50:00 +01:00
thankyouverycool
a2e935e7a2 HexEditor: Fix nullptr pass to AboutDialog and clean up menus
Refactors menubar creation to avoid a null parent window during
construction; moves search options to the more traditional edit
menu; creates and exclusive action group for bytes per row

Fixes #5177 in part
2021-02-26 13:50:00 +01:00
thankyouverycool
fb5cdc670f Browser: Add Go menu and move Bookmarks bar toggle to View 2021-02-26 13:50:00 +01:00
Jelle Raaijmakers
9473c694dc Spreadsheet: Fix cell identifier label
Commit 6a6f19a72 broke the cell position display in the top left of the
Spreadsheet window and the title of the cell type dialog, causing the
application to crash when interacting with cells beyond column FE.
2021-02-25 23:32:22 +01:00
Morc - Richard Gráčik
edf9d07d3f FileManager: change icon for Show in File Manager
A small detail to match with the new File Manager icon in context menu. :^)
2021-02-25 08:50:25 +01:00
thankyouverycool
4ebfdfdc05 Base: Update some icons for color, quality and consistency
And remove unused filetypes
2021-02-25 08:08:26 +01:00
thankyouverycool
42717b5b79 Base: Add new icons for fonts and File Manager 2021-02-25 08:08:26 +01:00
Brendan Coles
9bc3c3c962 Calculator: Add support for copy+paste using system clipboard 2021-02-24 22:01:37 +01:00
AnotherTest
6a6f19a72f Spreadsheet: Store the column index in a Position instead of its name
This will make constructing (and destructing) Positions a lot cheaper
(as it no longer needs to ref() and unref() a String).
Resulted from #5483, but doesn't fix it.
2021-02-24 21:02:02 +01:00
Andreas Kling
5d180d1f99 Everywhere: Rename ASSERT => VERIFY
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED)

Since all of these checks are done in release builds as well,
let's rename them to VERIFY to prevent confusion, as everyone is
used to assertions being compiled out in release.

We can introduce a new ASSERT macro that is specifically for debug
checks, but I'm doing this wholesale conversion first since we've
accumulated thousands of these already, and it's not immediately
obvious which ones are suitable for ASSERT.
2021-02-23 20:56:54 +01:00
Brandon Scott
99e6c9b23d Browser: Implement view source for out of process mode
Implemented view source functionality for out of process mode
and moved view source dialog creation into seperate static
method.
2021-02-23 16:23:56 +01:00
Brendan Coles
a032c836c4 HexEditor: Add menu icons for search menu items 2021-02-23 15:56:11 +01:00
AnotherTest
7c2754c3a6 AK+Kernel+Userland: Enable some more compiletime format string checks
This enables format string checks for three more functions:
- String::formatted()
- Builder::appendff()
- KBufferBuilder::appendff()
2021-02-23 13:59:33 +01:00
Andreas Kling
42f582bf8b DisplaySettings: Tweak UI, call it "1x/2x scale" instead of "100%/200%" 2021-02-22 14:13:00 +01:00
thankyouverycool
3e987eba2b TextEditor+LibGUI: Add case matching and wrap around optionality
Adds simple ASCII case matching and wrap around toggles to
TextEditor's find/replace widget and reorganizes its layout
2021-02-22 09:21:30 +01:00
Sviatoslav Peleshko
ff018607a1 SpaceAnalyzer: Added context menu for nodes
Currently supports 3 actions: Open, Copy Path, and Delete.
2021-02-21 23:47:49 +01:00
TheMorc
67d5c9e154 Run: Prefill text field with last command on launch
Fixes #5446
2021-02-21 20:21:56 +01:00
Mițca Dumitru
255da9b02b FileManager: Use newly introduced LibCore file management helpers
Most of the functions under FileUtils were removed, except those which
dealt with file deletion, as they spawned MessageBoxes for errors, as
such, those functions were written in terms of Core::File::remove.
2021-02-21 18:14:29 +01:00
Brian Gianforcaro
3019445492 Userland: Use uniform initialization instead of memset 2021-02-21 11:52:47 +01:00
Sameem Zahoor Taray
2c3f284b06
Run: Prevent printing [null] in case of empty history (#5433)
Pressing up-arrow or down-arrow with empty command history printed
[null] in the text area.

Fixes #5426
2021-02-20 22:28:54 +01:00
Andreas Kling
8c9ae4e537 Terminal+LibVT: Resize Terminal app window when requested by VT
This will allow us to react to things like DECCOLM.
2021-02-20 17:04:46 +01:00
Andreas Kling
adb6db9774 FileManager: Set tooltips on the path breadcrumb bar
Each segment of the breadcrumb bar now shows the path it represents.
2021-02-20 14:23:41 +01:00
Linus Groh
3583b62ad3 LibGUI: Swap order of InputBox value and parent window args
This is now consistent with the other dialog classes.
2021-02-20 12:19:46 +01:00
Linus Groh
8b78ed6308 Browser: Wrap DOMException values in regular JS::Error for console printing
Small hack to effortlessly make JS::MarkupGenerator output DOMExceptions
formatted like regular errors.
2021-02-20 00:09:11 +01:00
Andreas Kling
4f0be55770 LibGUI: Remove GUI::FilePicker::file_exists()
I have no idea why this existed but everyone should just use
Core::File::exists() instead. :^)
2021-02-19 23:46:54 +01:00
Linus Groh
8d0b744ebb CrashReporter: Fix showing assertion info in backtrace
This was needlessly expecting the first backtrace entry function name to
start with '__assertion_failed', which is no longer the case - it's now
something from libsystem.so. Let's just check whether we have an
'assertion' key in the coredump's metadata, just like we do for pledge
violations.
2021-02-19 18:53:00 +01:00
belginul
4f80bb6ce3 DisplaySettings: Show revert dialog only for resolution/dpi changes. 2021-02-19 12:19:03 +01:00
Nick Vella
bafb8b0be6 Run: Store and present recent Run command history in a ComboBox.
We now store the last 25 inputs ran in Run in a simple text file under
.config (~/.config/RunHistory.txt)
2021-02-17 23:06:19 +01:00
Linus Groh
fe266e03b6 PixelPaint: Open image file passed as argument
This is obviously a requirement for #5374, oops :^)

Also handle errors gracefully, opening a file that isn't PixelPaint JSON
would previously crash.

Closes #5388.
2021-02-17 19:39:37 +01:00
Andreas Kling
525f472dc5 SystemMonitor: Remove pid-and-tid tuple concept from ProcessModel
This was an old relic from back when thread IDs were per-process
instead of globally unique.
2021-02-16 20:38:49 +01:00
Andreas Kling
5f81babad2 SystemMonitor: Remove some unused cruft in ProcessModel 2021-02-16 20:24:22 +01:00
Andreas Kling
db694491f3 LibGUI: Make Model::data_matches() take Variant by const-reference 2021-02-16 20:08:32 +01:00
Andreas Kling
36354406db Browser: Don't show frame around the web view in full-screen mode
Let's use all the space we have available. :^)
2021-02-16 19:58:46 +01:00
Andreas Kling
4a5ebb89ea Browser: Don't focus the "bookmark" button when clicked 2021-02-16 19:08:09 +01:00
Andreas Kling
096cdf891b Revert "Terminal: Drop "proc" and "exec" pledges after initializing"
This reverts commit dea0d22ab3.

I'm dumb. We need these for utmpupdate, and for "new terminal" :^(

Fixes #5372.
2021-02-16 17:44:40 +01:00
Andreas Kling
89c7886d1c Terminal: Turn the "settings" and "find" popups into tool windows :^) 2021-02-16 16:26:29 +01:00
Andreas Kling
dea0d22ab3 Terminal: Drop "proc" and "exec" pledges after initializing
We shouldn't need these once we've got the shell process running. :^)
2021-02-16 13:39:03 +01:00
Stephan Unverwerth
6948f9ca55 TextEditor: Allow picking non-proportional font 2021-02-15 08:50:48 +01:00
Stephan Unverwerth
b8c25bc7ff LibGfx: Remove static load_from_file() from abstract Font class 2021-02-15 08:50:48 +01:00
Stephan Unverwerth
179dba652e LibGfx: Insert pixel and ttf fonts into Typeface structure
This adds a new structure 'Typeface' to the FontDatabase that
represents all fonts of the same family and variant.
It can contain a list of BitmapFonts with varying size but of
the same family and weight or a pointer to a single TTF font
for all sizes of this Typeface.
2021-02-15 08:50:48 +01:00
Sahan Fernando
ca731e2cdd SystemMonitor: Define graphs by ColorRole, not by Color
Currently, graphs are defined in terms of graph color. This means that
when the system palette is changed, the old colors are still used. We
switch to storing the color roles and looking up the palette colors on
paint events. We also define the graph line background color as the
graph color at half-transparency.
2021-02-14 13:27:36 +01:00
Andreas Kling
8415866c03 Kernel: Remove user/kernel flags from Region
Now that we no longer need to support the signal trampolines being
user-accessible inside the kernel memory range, we can get rid of the
"kernel" and "user-accessible" flags on Region and simply use the
address of the region to determine whether it's kernel or user.

This also tightens the page table mapping code, since it can now set
user-accessibility based solely on the virtual address of a page.
2021-02-14 01:34:23 +01:00
thankyouverycool
94e494d6d2 FileManager: Add layout options to View menu
File Manager's toolbar, location bar, status bar and folder pane
can now be toggled on/off
2021-02-13 11:01:59 +01:00
thankyouverycool
cb42ba0ab1 FileManager: Save 'Show dotfiles' setting in FileManager.ini 2021-02-13 11:01:59 +01:00
thankyouverycool
f9c1918484 TextEditor: Set wrapping and preview menus to correct defaults 2021-02-13 11:01:59 +01:00
thankyouverycool
5a03b326a7 TextEditor: Add layout options to View menu
Toolbar, status bar, and ruler can now be toggled on/off and their
settings are saved in ~/.config/TextEditor.ini
2021-02-13 11:01:59 +01:00
Sahan Fernando
e47af3044a SystemMonitor: Use system color themes for graph widgets 2021-02-12 22:04:40 +01:00
Andreas Kling
a50ba0a491 LibSyntax: Make rehighlight() take Gfx::Palette as by const-reference 2021-02-11 23:52:39 +01:00
AnotherTest
09a43969ba Everywhere: Replace dbgln<flag>(...) with dbgln_if(flag, ...)
Replacement made by `find Kernel Userland -name '*.h' -o -name '*.cpp' | sed -i -Ee 's/dbgln\b<(\w+)>\(/dbgln_if(\1, /g'`
2021-02-08 18:08:55 +01:00
Ben Wiederhake
c9bb887c55 Everywhere: Remove unnecessary headers 1/4
Arbitrarily split up to make git bisect easier.

These unnecessary #include's were found by combining an automated tool (which
determined likely candidates) and some brain power (which decided whether
the #include is also semantically superfluous).

My favorite #include:

    #include "Applications/Piano/Music.h" // You can't have too much music in life!
2021-02-08 18:03:57 +01:00
Ben Wiederhake
0a2304ba05 Everywhere: Fix weird includes 2021-02-08 18:03:57 +01:00
Andreas Kling
50308f6fda Shell: Move Shell syntax highlighter LibShell 2021-02-07 17:07:33 +01:00
Andreas Kling
ddbf20ecf6 LibSyntax+LibGUI+LibJS: Move JS syntax highlighter to LibJS
This is a little bit messy but the basic idea is:

Syntax::Highlighter now has a Syntax::HighlighterClient to talk to the
outside world. It mostly communicates in LibGUI primitives that are
available in headers, so inlineable.

GUI::TextEditor inherits from Syntax::HighlighterClient.

This let us to move GUI::JSSyntaxHighlighter to JS::SyntaxHighlighter
and remove LibGUI's dependency on LibJS.
2021-02-07 16:56:02 +01:00
Andreas Kling
43c7d7d285 LibSyntax: Move GUI::Highlighter to Syntax::Highlighter in LibSyntax
This is a move towards dropping more LibGUI dependencies.
2021-02-07 15:15:10 +01:00
Andreas Kling
ff2438e0ce LibGUI+LibCpp: Move C++ syntax highlighter to LibCpp
This makes LibGUI not depend on LibCpp.
2021-02-07 14:40:36 +01:00
Andreas Kling
5dd555fe2f SystemMonitor: Use SymbolServer to symbolicate thread stacks 2021-02-04 23:20:39 +01:00
Zac
cc2f35badd TextEditor: Implement word wrapping
Add a new wrapping mode to the TextEditor that will wrap lines at the
spaces between words.

Replace the previous menubar checkbox 'Wrapping Mode' in HackStudio and
the TextEditor with an exclusive submenu which allows switching between
'No wrapping', 'Wrap anywhere' and 'Wrap at words'. 'Wrap anywhere' (the
new 'Wrap lines') is still the default mode.

Setting the wrapping mode in the constructors of the TextEditorWidget
and HackStudio has been removed, it is now set when constructing the
menubar actions.
2021-02-03 10:33:23 +01:00
Andreas Kling
c94392a1cc Applications: Remove "Welcome" application
This was a cute application for its time, but it's far too jokey and
non-serious for how I'd like this project to treat itself.
2021-02-03 10:20:17 +01:00
EvilHowl
a0c773da9e DisplaySettings: Show a confirmation message when applying changes
The changes will be reverted after 10 seconds of no user input.
2021-02-03 10:17:19 +01:00
Andreas Kling
47d0ca85e8 pmap+SystemMonitor: Mark syscall regions with 'C' 2021-02-02 20:13:44 +01:00
Andreas Kling
31e04907b4 Revert "TextEditor: Add vim status indicators to the statusbar"
This reverts commit bd6d0d2295.
2021-02-02 19:01:54 +01:00
Zac
bd6d0d2295 TextEditor: Add vim status indicators to the statusbar
When using the VimEditingEngine in the TextEditor, vim's mode and the
previous key are shown in the editor's statusbar.
2021-02-02 16:08:20 +01:00
Ben Wiederhake
cbee0c26e1 Kernel+keymap+KeyboardMapper: New pledge for getkeymap 2021-02-01 09:54:32 +01:00
Ben Wiederhake
d9e7e13fb2 KeyboardMapper: Without arguments, load current keymap 2021-02-01 09:54:32 +01:00
Ben Wiederhake
03b11af00f KeyboardMapper: Export keymap not as a byte, but as unicode
What a silly mixup. Loading and saving no longer loses any data! :^)
2021-02-01 09:54:32 +01:00
Ben Wiederhake
4deb0f8343 KeyboardMapper: Remove duplicate 'save' button
There already is a standard action in the menu, and Ctrl-S also works.
No need to have an extra button for that.
2021-02-01 09:54:32 +01:00
Ben Wiederhake
6c04629ff8 KeyboardMapper: Make all of the GUI visible 2021-02-01 09:54:32 +01:00
Jean-Baptiste Boric
b48d8d1d6d Userland: Rename PCI slot to PCI device terminology 2021-01-31 19:06:40 +01:00
Andreas Kling
df2a4adcd2 Browser+LibWeb+WebContent: Make the "Debug" menu work in multi-process
This patch adds an IPC call for debugging requests. It's stringly typed
and very simple, and allows us to easily implement all the features in
the Browser's Debug menu.
2021-01-31 09:07:46 +01:00
Andreas Kling
ded78fc074 Browser: Turn on multi-process mode by default :^)
Frick it, let's just enable this by default and give ourselves a reason
to improve things! Some things are broken, and there's a bit of flicker
when resizing, but we can do this.

This drastically improves our web browsing security model by isolating
each tab into its own WebContent process that runs as an unprivileged
user with a tight pledge+unveil sandbox.

To get a single-process browser, you can start it with -s.
2021-01-30 23:16:41 +01:00
Linus Groh
6b7c96589b Everywhere: Add missing parent window to about dialogs
Partially addresses #5177.
2021-01-30 13:42:39 +01:00
Linus Groh
1a2b693242 HexEditor: Fix about dialog icon 2021-01-30 13:42:39 +01:00
Linus Groh
5b43419a63 SystemMonitor: Handle PCIDB::Database::open() failure gracefully
No need to dereference the nullptr, let's just show raw IDs instead.
2021-01-30 13:42:15 +01:00
Andreas Kling
0682a35148 SystemMonitor: Show VM region addresses as zero-padded hex ({:p})
0x1000000 and 0x10000000 looked way too similar without a leading zero.
2021-01-29 11:00:46 +01:00
Andreas Kling
3c7f5392a9 SystemMonitor: Trim "VMObject" suffix from VMObject types
Every VMObject type ends in "VMObject" and it's just taking up space.
2021-01-29 11:00:46 +01:00
Andreas Kling
b72f067f0d Kernel+Userland: Remove unused "effective priority" from threads
This has been merged with the regular Thread::priority field after
the recent changes to the scheduler.
2021-01-28 08:25:53 +01:00
asynts
eea72b9b5c Everywhere: Hook up remaining debug macros to Debug.h. 2021-01-25 09:47:36 +01:00
asynts
8465683dcf Everywhere: Debug macros instead of constexpr.
This was done with the following script:

    find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/dbgln<debug_([a-z_]+)>/dbgln<\U\1_DEBUG>/' {} \;

    find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/if constexpr \(debug_([a-z0-9_]+)/if constexpr \(\U\1_DEBUG/' {} \;
2021-01-25 09:47:36 +01:00
asynts
acdcf59a33 Everywhere: Remove unnecessary debug comments.
It would be tempting to uncomment these statements, but that won't work
with the new changes.

This was done with the following commands:

    find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec awk -i inplace '$0 !~ /\/\/#define/ { if (!toggle) { print; } else { toggle = !toggle } } ; $0 ~/\/\/#define/ { toggle = 1 }' {} \;

    find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec awk -i inplace '$0 !~ /\/\/ #define/ { if (!toggle) { print; } else { toggle = !toggle } } ; $0 ~/\/\/ #define/ { toggle = 1 }' {} \;
2021-01-25 09:47:36 +01:00
Nico Weber
cb89d3b780 FontEditor: change order of baseline and mean line row
The mean line is above the baseline, so it makes sense if the UI
elements are in the same order.
2021-01-24 22:02:23 +01:00
Nico Weber
40f6dfeacc FontEditor: change "Mean Line:" label to "Mean line:"
Matches the case used in other labels in the app.
2021-01-24 22:02:23 +01:00
Nico Weber
42a8f99374 FontEditor: Fix typos in code
No behavior change.
2021-01-24 22:02:23 +01:00
Nico Weber
90e09dd7a8 FontEditor: Make left and right UI margins match 2021-01-24 22:02:23 +01:00
Nico Weber
8bb9c667fd FontEditor: Remove "Save" and "Quit" buttons
We have both the normal menu items and keyboard shortcuts for these by
now. No need to have always-visible buttons -- makes the app more
consistent with the other apps, and makes it use up less vertical space.
2021-01-24 22:02:23 +01:00
Camisul
0678dab7dc HexEditor: Find
Added search submenu with options to find or find again.
Find allows to search for ASII string or sequence of Hex value.
2021-01-24 19:23:31 +01:00
DragonAlex98
509e39ac00 FileManager: Make DirectoryView open links in their real directory
Previously it was possible to open a link like /home/anon/Desktop/Home,
leading to a folder with the same name. Now it correctly opens its real
path, which is /home/anon

FileManager: Use Core::File::real_path_for to get real path of links
2021-01-24 19:21:54 +01:00
Andreas Kling
5d9c36d016 Run: Pledge "thread"
This is needed for the thumbnail generation thread used by FilePicker.

Fixes #5015.
2021-01-23 09:54:46 +01:00
asynts
27bc48e06c 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-22 22:14:30 +01:00
Ben Wiederhake
1e7adf5cb6 LibGUI: Resolve cyclic inclusion
Application.h includes Widget.h which includes Application.h. I'm not entirely
sure what the semantics are in this case, but avoiding this seems to be the
safer approach. In this case, Widget does not actually use Application, so let's
just remove the unused include.
2021-01-22 21:49:54 +01:00
Pierre
8e265b512a PixelPaint: adding an option to export as PNG 2021-01-22 20:39:25 +01:00
Andreas Kling
2cd07c6212 Kernel+Userland: Remove "dns" pledge promise alias
This was just an alias for "unix" that I added early on back when there
was some belief that we might be compatible with OpenBSD. We're clearly
never going to be compatible with their pledges so just drop the alias.
2021-01-22 19:39:44 +01:00
Linus Groh
5e95a777e0 Calculator: Give the '9' button a blue foreground color as well 2021-01-22 18:40:55 +01:00
Nico Weber
2fe6a313c2 LibGfx: Implement blit_offset() in terms of blit()
It's less code, and blit() already handles scaled painters.

Fixes the window server asserting in highdpi mode with a centered
background image. Part of #5017.
2021-01-22 17:32:44 +01:00
Linus Groh
17f90e72b4 CrashReporter: Show pledge violation in backtrace 2021-01-20 21:01:15 +01:00
Linus Groh
ea80ff882d Run: Fix newline in info label
This apparently was a workaround for escape sequences in GML at some
point (see #4937), but it now literally inserts "\n" and no newline, as
the backslash itself is escaped.
2021-01-20 19:14:40 +01:00
Andreas Kling
2cd16778b5 AudioServer+LibAudio: Pass audio buffers as Core::AnonymousBuffer
This was the last remaining user of shbufs! :^)
2021-01-17 09:07:32 +01:00
Andreas Kling
cc8b3c92ba Everywhere: Remove a bunch of now-unnecessary shared_buffer pledges 2021-01-17 09:07:32 +01:00
Linus Groh
d64d2ff07b SpaceAnalyzer: Change tabs to spaces in GML file
This is a four-spaces-for-indentation project! :^)
2021-01-17 08:43:46 +01:00
Nico Weber
d7a3128c1d DisplaySettings: Add more resolution choices
These are 2x the smallest 4 resolutions. When picking one of these
in 1x and then half the size in 2x, the window server adjust the
ui scale factor, but the actual framebuffer size doesn't change.

2560x1440 also happens to be 5k resolution and monitors with that
resolution do exist -- so that seems like a good upper limit :)
2021-01-17 08:06:12 +01:00
Nico Weber
f37f281f89 DisplaySettings: Add UI for switching the scale factor
For now, only support 1x and 2x scale.

I tried doing something "smarter" first where the UI would try
to keep the physical resolution constant when toggling between
1x and 2x, but many of the smaller 1x resolutions map to 2x
logical resolutions that Compositor rejects (e.g. 1024x768 becomes
512x384, which is less than the minimum 640x480 that Compositor
wants) and it felt complicated and overly magical.

So this instead just gives you a 1x/2x toggle and a dropdown
with logical (!) resolutions. That is, 800x600 @ 2x gives you
a physical resolution of 1600x1200.

If we don't like this after trying it for a while, we can change
the UI then.
2021-01-17 08:06:12 +01:00
Marco Cutecchia
14f075b26d SoundPlayer: Added 'shared_buffer' to pledge
This fixes a crash that occured when opening a file due to not pledging 'shared_buffer'
2021-01-16 22:54:21 +01:00
Brendan Coles
aa8cb35b90 TextEditor: Add help documentation 2021-01-16 19:35:08 +01:00
Andreas Kling
d312011708 Everywhere: Drop "shared_buffer" in most GUI programs, pledge "recvfd"
Now that WindowServer broadcasts the system theme using an anonymous
file, we need clients to pledge "recvfd" so they can receive it.

Some programs keep the "shared_buffer" pledge since it's still used for
a handful of things.
2021-01-16 19:30:32 +01:00
Andreas Kling
c71807a3fc Everywhere: Convert a handful of String::format() => formatted() 2021-01-16 14:52:04 +01:00
Andreas Kling
64610ca80e Everywhere: Remove a bunch of <AK/SharedBuffer.h> includes 2021-01-16 11:26:53 +01:00
Nick Vella
40083444a0 Run: initial implementation of Run app 2021-01-16 09:05:01 +01:00
Linus Groh
6f666c20f5 CrashReporter: Show CPU register state for all threads
Closes #4777 .
2021-01-15 23:26:47 +01:00
Linus Groh
33c31e2198 CrashReporter: Show arguments and environment
Arguments as a simple label, environment in a new tab. :^)

Closes #4779.
2021-01-15 23:26:47 +01:00
Linus Groh
7668e968af LibCoreDump+Crash{Daemon,Reporter}: Make backtraces thread-specific
We want to show an individual backtrace for each thread, not one
containing backtrace entries from all threads.

Fixes #4778.
2021-01-15 23:26:47 +01:00
Linus Groh
3718a16f59 CrashReporter: Put backtrace TextEditor in a TabWidget
Since CrashReporter will be showing more info from coredumps soon, we
need tabs to put those things somewhere! :^)
2021-01-15 23:26:47 +01:00
Linus Groh
568cde5e23 Kernel+LibELF+LibCoreDump+CrashReporter: Use JSON for ProcessInfo
This is in preparation of adding (much) more process information to
coredumps. As we can only have one null-terminated char[] of arbitrary
length in each struct it's now a single JSON blob, which is a great fit:
easily extensible in the future and allows for key/value pairs and even
nested objects, which will be used e.g. for the process environment, for
example.
2021-01-15 23:26:47 +01:00
Nico Weber
63ac9462ad WindowServer: Add a "scale" parameter to the SetResolution message and plumb it through
Now, `chres 640 480 2` can set the UI to HighDPI 640x480 at runtime. A
real GUI for changing the display factor will come later.

(`chres 640 480 2` followed by `chres 1280 960` is very fast since
we don't have to re-allocate the framebuffer since both modes use
the exact same number of physical pixels.)
2021-01-15 22:05:08 +01:00
Cypher87
0f7efd5bf1
FileManager: Added label "Location" to BreadcrumbBar (#4924) 2021-01-15 19:37:27 +01:00
Nico Weber
9abcc2fb6c DisplaySettings: Fix a comment typo 2021-01-15 19:13:46 +01:00
Nico Weber
699ba84bea DisplaySettings: Rename wallpaper setting "scaled" to "stretch"
I want to add a scale factor for picking pixel density, and using
the same terminology for wallpaper handling would be confusing.
2021-01-15 19:13:46 +01:00
Andreas Kling
20915795a8 Everywhere: Pledge "sendfd" in WindowServer client programs
This is needed for the new way we transfer window backing stores.
2021-01-15 14:10:32 +01:00
Mart G
29102051d9 SpaceAnalyzer: Fix TreeMapWidget layout issue for small rects.
For small rects there was a disagreement between two parts of the
layout algorithm. There is a function that decides if there is
enough space in a rectangle for a label. But this function was
called on two slightly different rectangles.
2021-01-14 16:45:55 +01:00
Andreas Kling
1a08ac72ad LibC+Everywhere: Remove open_with_path_length() in favor of open()
This API was a mostly gratuitous deviation from POSIX that gave up some
portability in exchange for avoiding the occasional strlen().

I don't think that was actually achieving anything valuable, so let's
just chill out and have the same open() API as everyone else. :^)
2021-01-12 23:34:01 +01:00
Andreas Kling
aea2eac3d1 HexEditor: Hide unnecessary scrollbars in the main file view 2021-01-12 13:31:32 +01:00
Andreas Kling
dc28c07fa5 Applications: Move to Userland/Applications/ 2021-01-12 12:05:23 +01:00