8429 Commits

Author SHA1 Message Date
Humdinger
db6fcb750a People: fix aspect ratio for square images
If you dropped a square image onto the image well, it was
squashed horizontally.

Change-Id: Ie5637fc242a1c5b7313234a87822bc43556cbe4d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1886
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-09-25 23:44:04 +00:00
Andrew Lindesay
d2d4866dd4 HaikuDepot: Display User's Usage Conditions
A HaikuDepotServer may have previously agreed to
user usage conditions.  If this is the case then
they are now able to view those conditions.  There
were some problems with date formatting in this
change and so the date formatting logic has moved
into the HaikuDepot source code temporarily until
issues with the BDateTime class can be resolved;
most likely as a separate piece of work.

Relates to 15209

Change-Id: Ic3e5413d9139f410d7f7e8b566d4c56352dd2778
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1870
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-09-24 10:33:43 +00:00
Murai Takashi
7ddb9624b2 Terminal: Fix mismatching malloc/delete
fAlternateScreen is allocated by malloc() in
BasicTerminalBuffer::_AllocateLines(), but freed by delete.
Pointed out by LGTM.

Change-Id: I526ecd7e570caf7d5ed90c715bbbfaf40e7e4be6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1882
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-09-21 16:09:27 +00:00
Murai Takashi
36bf86d2b6 Pulse: Fix 'new[]' array freed with 'delete'
cpu_menu_items is allocated by new[] in Init(), but freed by delete.
Pointed out by LGTM.

Change-Id: I4cc669c519cc4ea3e170cb9f421d6b4ff77df8a2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1881
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-09-21 16:06:08 +00:00
Murai Takashi
931aec2b6c Mandelbrot: Fix 'new[]' array freed with 'delete'
fRenderBuffer is allocated by new[] in MessageReceived(),
buf freed by delete.
Pointed out by LGTM.

Change-Id: I06efc1c8075a421e7f2983e8a0d817a1bf43b026
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1880
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-09-21 16:04:57 +00:00
Murai Takashi
dfb3c928f8 Deskcalc: Fix 'new[]' array freed with 'delete'
fKeypad is allocated by new[] in _ParseCalcDesc(), but freed by delete.
Pointed out by LGTM.

Change-Id: Iac81d3cc6bfcf003ddf9146415a4400c34a1b7f2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1879
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-09-21 16:03:09 +00:00
Humdinger
1448ced00b HaikuDepot: sentence casing notification titles
* We generally use sentence casing, even for alerts and notification
  titles

* Using "User usage conditions" uses a bit too many 'users' for my
  taste. How about dropping the "User" and distinguish possible future
  additions with e.g. "Developer usage conditions"?

Change-Id: Iff2473ec193515b960d3da45bbd590c95413f99f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1869
Reviewed-by: Andrew Lindesay <apl@lindesay.co.nz>
2019-09-20 16:58:57 +00:00
Humdinger
66d438d128 Mail: change keyboard shortcuts / labels
1) People normally don't change their email account and Mail settings
   often after the initial setup and short tweaking period. Using
   keyboard shortcuts on those menu items is wasteful. Let's remove
   them.

2) OTOH, I need to in/decrease the quoting level rather often (Mail
   could probably be more intelligent here, too...).
   Also, the current shortcuts for this ALT+' and ALT+SHIFT+' are awkward
   and in some keymaps (German, for example) unreachable.
   With the change in 1), ALT +/- becomes available, which is easily
   reched with many keymaps AFAIK, and the numpad.

3) Rename the menu items "Quote" and "Remove quote" to
   "Increase quote level" and "Decrease quote level", which is much
   more correct. Also ties n nicely with the +/- shortcuts.

4) Rename the BMessage constants for consistency.

Change-Id: I2da21ed3aa465c30d09b2520288b64dea70feeec
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1868
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-09-18 03:33:26 +00:00
Mikael Konradsson
9b695ae61d ProcessController: Fixed bars so they are aligned in center and scale
with the selected fonts

Change-Id: I016c600d62ea28d4197f94f29ec0c372b5a87169
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1848
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-09-14 17:31:11 +00:00
Augustin Cavalier
7ba58efd3a Installer: Skip block, character, FIFO, and socket devices/files.
Fixes #15019.
2019-09-14 00:40:30 -04:00
Mikael Konradsson
9a9f4ef578 Deskbar: Made expander knobs light when menu background is dark
Change-Id: I56a2fe1d4b1ce66476077e96e64066bf2950b4b4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1846
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-09-12 09:38:41 +00:00
Andrew Lindesay
0c82f64bf6 HaikuDepot: Conditions on Create User
When the user chooses to create a new user they
are able to view the current usage conditions for
users.  They are also required to agree to the
conditions and they are required to confirm that
they meet the minimum age requirement.

Relates to 15209

Change-Id: I83cdaabe1b3da31a4cd21139b72341f4b93cab85
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1842
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-09-10 06:10:17 +00:00
Andrew Lindesay
051ee9d8fc HaikuDepot: Improvements to User Ratings
Change to match the web user interface behaviour;
the user ratings for all architectures are shown
and the list of user ratings is restricted to the
actual repository in use.  This is important
where two repositories have the same package with
different versions.  Also the architecture
is displayed with the version in the package info
page.

Change-Id: I8c024d9ddec6b97f52233b7462c47d2a1c83af09
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1817
Reviewed-by: Andrew Lindesay <apl@lindesay.co.nz>
2019-09-09 08:15:35 +00:00
Augustin Cavalier
75d2b89f76 Terminal: Fix GCC2 build. 2019-09-07 15:11:46 -04:00
sushilhub
595f071522 mediaplayer: write a break statement
Change-Id: I3cb8a7c6dcd6369b18062677963947fb4a313669
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1837
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-09-07 15:04:55 +00:00
Humdinger
8577990620 Mail: Better placement of signature menu
When clicking the "Signature" button in the toolbar, no mouse
coordinates are available. The current hack is to open the menu
in the center of the tool bar, which is normally no way near
where the user has clicked the button. Not nice.

Change that to find the button coordinates and place the menu a bit
to the left of its center (so chances are the menu pops up already
under the mouse).

Fall back to the old hack, if the signature button wasn't found for
some reason...

Change-Id: I8fb5dbe4e2d394768a685fda0dc71d3cb2c5961d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1836
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-09-07 15:03:50 +00:00
Simon South
8840b3db9a Terminal: Allow use of Option as Meta key
Add a configuration setting that allows the left Option key to be used as a
Meta key, and add support for the Escape sequences that control the Meta key's
behaviour.

TermWindow now maintains a copy, shared by all its component TermViews, of the
current key map, and updates this copy automatically when notified by the Input
Server a new key map has been loaded.

The Meta key was an extra modifier key present on early UNIX workstations that
provided access to the "extended" portion of the ASCII character set. Although
it has vanished from modern keyboards certain UNIX software still relies on the
key, most notably GNU Emacs and the GNU readline library, the latter of which
is used by bash and a wide variety of other software that reads input from a
terminal. (Python's interactive mode uses readline, for instance.)

With this patch applied and the new setting enabled, the left Option key can be
used to access additional editing and navigation features at the command line.
It also makes usable the port of GNU Emacs currently available from HaikuDepot.

Fixes #15294.

Change-Id: I150b640b7b18384d56ab2fb017bf16ce8bdbdd78
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1727
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-09-06 22:32:07 +00:00
Humdinger
f36398cd4f Mail: fix translations in "Queries" menu 2019-09-06 19:58:33 +02:00
Humdinger
ea0042d5f4 Update translation credits
Added Fabio Tomat for the Friulian localization. Thanks!

Uncomment Catalan credits, as it's quite far along and its
catkeys are in trunk. Thanks, Paco Rivière!

Fixes #15323
2019-09-02 17:11:57 +02:00
Niels Sascha Reedijk
55fdd59f65 i18n: fix minor issues in English strings
Thanks for the reports via Pootle (i18n.haiku-os.org)
2019-09-01 07:11:35 +01:00
Andrew Lindesay
01339a54db HaikuDepot: Display User Usage Conditions
This change will allow the user to view the user
usage conditions from the HDS system in a
HaikuDepot window.  The display of the text is not
currently well formatted in that the Markdown is
not yet properly parsed, but the display of the
data is working.

Relates to 15209

Change-Id: Ia6ad4ef995f5fe3c29c40221964e44d4554a033d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1750
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-09-01 03:08:11 +00:00
CodeforEvolution
9e54316c52 Fix the build of test_app_server on 64bit
So many Jamfiles to search through...runs also, but there
are lots of graphical glitches

Change-Id: Ibf9e64566a5b8c5742792ac9b1b0f9ccc6693c8d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1753
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-09-01 03:04:52 +00:00
Augustin Cavalier
29536b4c4b Mail: Don't use strtok.
That seems like a bad idea...
2019-08-31 23:01:51 -04:00
Augustin Cavalier
731be7dde1 Relicense all of Ingo's BSD/MIT+advertising clause'd code as plain MIT.
Via email:
> I'm fine with re-licensing all code using BSD license + advertising
> clause to MIT license.
2019-08-30 18:27:35 -04:00
Humdinger
abdd9ab439 DriveSetup: Tweak mount mode icons and colors
* Use 2D icons for mount modes: encrypted, file, readonly, shared
  ('boot' already uses he 2D Overlay_leaf)
* Use more vibrant colors for used space indicators.
  (red = readonly, green = BFS, blue = non-BFS, grey/orange = encrypted)
* Don't have boot/bfs partitions override readonly status (red) with
  green. Keep it simple: if anything mounts read-only, show in red.

Change-Id: I4a7c53e1c1d3c6f4be35cbd680b2a7b5e1f9bea3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1755
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:29:38 +00:00
Jaroslaw Pelczar
4f77a907ba debuganalyzer: Fix catch of polymorphic object by value
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I1290a313905d3d940532c7c1626a631bf70afb29
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1762
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:02:35 +00:00
Jaroslaw Pelczar
8965d4ab78 DebugAnalyzer.cpp: Fix catch of polymorphic exception by value
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I580dafec7fa0ab038b394f50a5a5131b86711cde
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1761
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:02:35 +00:00
Mikael Konradsson
178d693469 DiskUsage: Fixed scanning status label text color for dark mode.
Change-Id: Iac5f1649c0bd6873448f66a544647e37a542d9b2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1756
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-08-29 15:23:30 +00:00
Augustin Cavalier
925cb64e3c AboutSystem: Move leavengood from past to current maintainers.
Once again, welcome back :)
2019-08-14 18:04:56 -04:00
CodeforEvolution
6a739773fc CodyCam: Style Fixes, Make Resource File Verbose
No functional change intended, added some copyrights
in the process.

Change-Id: Ic6ebe276bb939c425d65aff1b3b07c7c2e27a33a
Reviewed-on: https://review.haiku-os.org/c/1698
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-10 17:57:03 +00:00
Ryan Leavengood
b711002d34 HaikuDepot: Set package state when loading single package
Without this, even installed packages still get an "Install" button.

Fixes #14821.

This was implemented by adding BPackageRoster::IsPackageActive. I decided to
have this take a location since GetActivePackages also did, but as noted in my
TODO comment, I think this is awkward.

It would also be nice to show the user they have a different version of a
particular package, but that would require some changes to IsPackageActive.

Change-Id: Iab0d35eb6b671a17711b0214b15164d296927e5a
Reviewed-on: https://review.haiku-os.org/c/1694
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-08-08 07:09:35 +00:00
Adrien Destugues
639bb82701 AboutSystem: remove NetBSD credits
We don't ship ftp anymore, and our tput comes from ncurses now.

Change-Id: I80e99b72f5bb16147a234d6d72a277a5035b6e00
Reviewed-on: https://review.haiku-os.org/c/1680
Reviewed-by: Rene Gollent <rene@gollent.com>
2019-08-06 19:20:39 +00:00
Augustin Cavalier
2c588b031f kernel: Properly separate and handle THREAD_BLOCK_TYPE_USER.
Consider this scenario:
 * A userland thread puts its ID into some structure so that it
   can be woken up later, sets its wait_status to initiate the
   begin of the wait, and then calls _user_block_thread.
 * A second thread finishes whatever task the first thread
   intended to wait for, reads the ID almost immediately
   after it was written, and calls _user_unblock_thread.
 * _user_unblock_thread was called so soon that the first
   thread is not yet blocked on the _user_block_thread block,
   but is instead blocked on e.g. the thread's main mutex.
 * The first thread's thread_block() call returns B_OK.
   As in this example it was inside mutex_lock, it thinks
   that it now owns the mutex.
 * But it doesn't own the mutex, and so (until yesterday)
   all sorts of mayhem and then a random crash occurs, or
   (after yesterday) an assert-failure is tripped that
   the thread does not own the mutex it expected to.

The above scenario is not a hypothetical, but is in fact the
exact scenario behind the strange panics in #15211.

The solution is to only have _user_unblock_thread actually
unblock threads that were blocked by _user_block_thread,
so I've introduced a new BLOCK_TYPE to differentiate these.
While I'm at it, remove the BLOCK_TYPE_USER_BASE, which was
never used (and now never will be.) If we want to differentiate
different consumers of _user_block_thread for debugging
purposes, we should use the currently-unused "object"
argument to thread_block, instead of cluttering the
relatively-clean block type debugging code with special
types.

One final note: The race condition which was the case of
this bug does not, in fact, imply a deadlock on the part
of the rw_lock here. The wait_status is protected by the
thread's mutex, which is acquired by both _user_block_thread
and _user_unblock_thread, and so if _user_unblock_thread
succeeds faster than _user_block_thread can initiate
the block, it will just see that wait_status is already
<= 0 and return immediately.

Fixes #15211.
2019-08-05 22:31:02 -04:00
Andrew Lindesay
02e836dc3c HaikuDepot: Barber Pole Idle Appearance
This change renders a striped background in the
'barber pole' in HaikuDepot application when it is
idle.  This makes the 'barber pole' easier to use
in situations where the space that the UI control
takes up should not be blank.  The logic for the
striped background is from the 'drivesetup'
application.

Change-Id: I87791c70b4d1a21d91e661433d6c940ca69ece87
Reviewed-on: https://review.haiku-os.org/c/1674
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-08-05 07:39:39 +00:00
Ryan Leavengood
47df2afbf8 ShowImage: Wrap to first image when going next on last image
I find this handy and in addition it makes the slide show cyclic again,
fixing #10386.

Going the other way might also be useful, but that requires some additions to
the Navigator code first.
2019-08-02 21:27:14 -04:00
Ryan Leavengood
7451b647db StyledEdit: draw the status bar with the panel text color
Hopefully this is the last piece of #4868.
2019-08-02 19:49:59 -04:00
Ryan Leavengood
ecba7b5c7e Tracker: Ensure loading the Node works before passing to a Filter
Checking errors is important. This properly fixes #10365 and resolves a few
TODOs.

This DirectoryFilter is also used in Expander, though with a lower level
implementation that did not trigger this bug. This feels like it could be
in the the Tracker or shared kit.

Change-Id: Icd2ddc241c1879a7c4235726bf089570ba00dc0a
Reviewed-on: https://review.haiku-os.org/c/1672
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-02 04:31:43 +00:00
Murai Takashi
cbc96724ab Localize AutoRaise
Change-Id: I3d71aa0691c4d8a59b6e8d4dbb2d7d4e7eab47c9
Reviewed-on: https://review.haiku-os.org/c/1659
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-31 02:11:19 +00:00
Adrien Destugues
4950607607 Add a features.h to auto enable _DEFAULT_SOURCE
Unless __STRICT_ANSI__ is defined (as it is when running the compiler in
--std=c89 or --std=c99, but not when running it without any specific
args), we can enable these by default and behave like most other
systems. I don't know why no one has done this yet despite suggesting it
multiple times and people prefer to #define _BSD_SOURCE manually
everywhere.

Remove all places in our Jamfiles and sources where it had been defined.
_DEFAULT_SOURCE is now enabled by default for all sources of Haiku, since we
let the compiler use GNU extensions (no strict C standard specified on
command line)

Use _DEFAULT_SOURCE as the define name to match current versions of
glibc. Enable it if _BSD_SOURCE is #defined in compiler flags, for
backward compatibility.

Change-Id: I6db04da5f6db437723cdfba3478f5094a69d7727
Reviewed-on: https://review.haiku-os.org/c/1633
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-07-29 20:26:46 +00:00
Jérôme Duval
70e55f0046 autoraise: fix debug build.
Change-Id: I8ee35807eab8252dcb2399734fc5831f2b50690f
Reviewed-on: https://review.haiku-os.org/c/1657
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-28 20:34:23 +00:00
Humdinger
f5cdaacd20 Minor GUI string changes
HaikuDepot: change BAlert title
DriveSetup: capitalize Mimes -> MIMEs
2019-07-28 20:09:54 +02:00
Augustin Cavalier
565155afa1 Remove unnecessary usages of BLocker::Sem().
Most of these should have been BLocker::InitCheck() anyway.
The one that was actually using the sem (MessageLooper)
should just store the name parameter, which simplifies
things anyway.

Done as a result of a branch where I'm experimenting
with making BLocker not even create a semaphore in
"benaphore" mode.
2019-07-27 18:31:58 -04:00
Murai Takashi
122d4ef7e9 PVS V595: Pointer was utilized before it was verified against nullptr.
Change-Id: Iba8b7e6160dc237f45080fa7c101fa72e4d8c753
Reviewed-on: https://review.haiku-os.org/c/1643
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-27 15:22:15 +00:00
Dancsó Róbert
fc8ec82116 DriveSetup: vizualize more information
- Show a lock for encrypted partitions (bitlocker, pgp, safeboot, luks)
- Show icons for boot, shared, virtual or read-only partitions
- Use different colors for boot, bfs, encrypted partitions
- Show partition usage in visual overview (only for mounted volumes)
- Add more infos in the parameter column
- Add columns with free space and block size

Fixes #10098 (as mentionned there, TrueCrypt/DriveEncryption can't be
detected)

Change-Id: I44914bacfabadaec4f862c8816f9575dc9617798
Reviewed-on: https://review.haiku-os.org/c/1399
Reviewed-by: Kacper Kasper <kacperkasper@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-07-25 19:17:23 +00:00
Murai Takashi
b261a89808 HaikuDepot: Add files to DoCatalogs for localizing more text.
Change-Id: I5bbb00b0aea51c899a0cc4efeb6028e9441e50d4
Reviewed-on: https://review.haiku-os.org/c/1648
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-25 00:09:25 +00:00
Adrien Destugues
194c483884 Move SettingsHandler to libshared
It's used by both Tracker and Codycam and others might find it useful.

Change-Id: I585d3a1bdc7f8fce7d36bedf6867464cd541ba2e
Reviewed-on: https://review.haiku-os.org/c/1637
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-21 15:47:48 +00:00
Adrien Destugues
1602e35c4c PVS V774: use after free
Change-Id: I96267456623389e66f003bef94246c7d58a2c23d
Reviewed-on: https://review.haiku-os.org/c/1626
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-17 22:17:22 +00:00
Adrien Destugues
6cc8d65e9e PVS V593: missing parentheses
Change-Id: I717b13ebf9b5e2436842cfadab757187529567f2
Reviewed-on: https://review.haiku-os.org/c/1613
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-17 01:57:50 +00:00
Adrien Destugues
fcf7cbe79e PVS V522: null pointer dereferences
Change-Id: Iaa753ef3a93c36031789a85f87e569fc410d3304
Reviewed-on: https://review.haiku-os.org/c/1604
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-16 20:44:32 +00:00
Humdinger
583c561cb2 Button labels: "Ok" -> "OK"
All caps is our standard.
2019-07-16 20:26:45 +02:00