Commit Graph

59714 Commits

Author SHA1 Message Date
Rob Gill
1e82c5d927 preferences/printers Close dialog on alt+w/esc - Bug #14573
* Adds keyboard shortcuts to close the Add Printer dialog

Change-Id: Iac3d75c4b3e27793124919112f1be68308c95db3
Reviewed-on: https://review.haiku-os.org/c/1019
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-02-10 10:04:36 +00:00
Adrien Destugues
e89985cc31 Fix drawing of B_GRAY1 bitmaps.
- Colors were reversed
- Padding was not handled properly because of a roundeing error

Add a test that shows the issue (behavior confirmed against BeOS)

Change-Id: I4c6e954fb6bdab92ad4e0e96897e78b26eb4727b
Reviewed-on: https://review.haiku-os.org/c/1025
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-02-10 09:59:38 +00:00
Rob Gill
8341933096 preferences/datatranslations Scale window with font size (Fix Bug #13166)
* Specifies minimum window size based on system font settings
   (prevents clipping of message with large fonts)

Change-Id: I851e0c3604816a4e935178d1a4f33de7b7478060
Reviewed-on: https://review.haiku-os.org/c/1017
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-02-08 09:14:21 +00:00
Rob Gill
897792ef3f pkgman: Perform URL format validation Bug #13786
* Tests for validity of supplied URL before attempting to add it

   BUrl's isValid() is used to test the URL

Change-Id: I49bfc266177f16052a46ca3dbc1fd6e8dd1ab6ae
Reviewed-on: https://review.haiku-os.org/c/1020
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-02-08 07:33:26 +00:00
Adrien Destugues
7232789211 Extract parse_size function from ramdisk command.
Change-Id: If7dd36321e1ed2feb20b4c76ddaf303bc997d8b7
Reviewed-on: https://review.haiku-os.org/c/1018
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-02-08 07:19:26 +00:00
Murai Takashi
0ca56bdecd translators/wonderbrush: Fix PVS 2320
Fix memory leak when realloc() fails.

Change-Id: I9665b1e618e675e324eb75aec586a41181957ced
Reviewed-on: https://review.haiku-os.org/c/1015
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
2019-02-07 11:43:07 +00:00
Murai Takashi
7db28d3803 kits/locale: Fix PVS 495
Fix memory leak when realloc() fails.

Change-Id: I9062bb177919805e9973c5afd6bc01f8fbb753b6
Reviewed-on: https://review.haiku-os.org/c/1016
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
2019-02-07 11:43:00 +00:00
Murai Takashi
f9c74ffa6f add-ons/media/plugins/ffmpeg: Fix PVS 2355
Fix memory leak when realloc() fails.

Change-Id: I12b57fecbd7f9645f15afb9d0f9a6db937a5ec09
Reviewed-on: https://review.haiku-os.org/c/1014
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
2019-02-07 11:22:11 +00:00
Jérôme Duval
f33f4868fe posix_spawn: add posix_spawn_file_actions_add[f]chdir_np.
see http://austingroupbugs.net/view.php?id=1208
and https://sourceware.org/bugzilla/show_bug.cgi?id=17405

* also free paths in posix_spawn_file_actions_destroy().

Change-Id: I8bed848154025bd5a25322bdc4c25aa417f86ec6
Reviewed-on: https://review.haiku-os.org/c/1010
Reviewed-by: Rene Gollent <rene@gollent.com>
2019-02-06 16:39:33 +00:00
Rob Gill
e4803b2c61 Code cleanup (ellipsis) no functional changes
* Replace instances of hardcoded "..." with B_UTF8_ELLIPSIS

 * Removal of trailing whitespaces

Change-Id: I82d26fb3e599daa2931c69c3bda3b9a5ab719d00
Reviewed-on: https://review.haiku-os.org/c/1012
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-06 16:37:51 +00:00
Murai Takashi
1d0064be8b file_systems/netfs/server: Fix attempting to delete released memory
Remove 'delete securityContext;' at line 967, since 'securityContext'
will be deleted by ObjectDeleter.

Pointed by clang static analyzer.

Change-Id: Iffcd6e2b293d5614fa15ee108562ff1f5f23ddc9
Reviewed-on: https://review.haiku-os.org/c/1011
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-06 07:27:12 +00:00
Jérôme Duval
af61539918 posix_spawn: add POSIX_SPAWN_SETSID.
see http://austingroupbugs.net/view.php?id=1044

Change-Id: I9ae4fe07ea0fa7e20eb9a1d8c64e971e7353bcff
Reviewed-on: https://review.haiku-os.org/c/1008
Reviewed-by: Rene Gollent <rene@gollent.com>
2019-02-04 19:21:30 +00:00
Adrien Destugues
f0a99f2bea WebPositive: check if SSE2 is available.
We cannot run if it's not, but at least let's have an understandable
error message.

Fixes #14583

Change-Id: Ibe2e5d7721a1c48f06c2ac37d007a59d80c14bab
Reviewed-on: https://review.haiku-os.org/c/1007
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-04 16:44:50 +00:00
ahenriksson
c71d928ee0 bfs: Print diagnostic message when disk size is too small
Change-Id: Ie7bff78b1b0c783bc74f1fe774ec31f8437257df
Reviewed-on: https://review.haiku-os.org/c/922
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-02-04 16:37:35 +00:00
ahenriksson
0ec6ced115 bfs: Flush transactions with no blocks in _FlushLog()
Since the file system resizing code must reinitialize the block cache,
it is necessary that it is completely empty.

Change-Id: If0df9f8c003edb4ccc65c4b42940512400f8598c
Reviewed-on: https://review.haiku-os.org/c/921
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-04 16:37:35 +00:00
ahenriksson
b9256c155b disk_device_manager: implement KFileSystem::Resize()
Change-Id: I122a3881b0d0a8febc23c9751d5e32018c26da5e
Reviewed-on: https://review.haiku-os.org/c/920
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-04 16:37:35 +00:00
Rob Gill
13ce87c6f2 apps/processcontroller Fix deskbar icon scaling issue Bug #14696
* Clear entire width of interspace between CPU and Memory bars

   Fixes issue of artefacts appearing to the left of the memory
   bar when adjusting deskbar width, especially on multi-core
   systems at large font sizes.

   (original code appears to have assumed interspace would not
   exceed two pixels in width)

Change-Id: I4183d0337e47573792f35280452455fda584ccaf
Reviewed-on: https://review.haiku-os.org/c/1003
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-03 18:06:11 +00:00
Murai Takashi
f465c7fa61 kits/midi2: Fix PVS 820
Fix memory leak when realloc() fails.

Change-Id: Ic787ca714e4a106cc22e6186078a8e72d0a0553d
Reviewed-on: https://review.haiku-os.org/c/1006
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-03 18:05:55 +00:00
Murai Takashi
21392fa9b1 mail: Fix PVS 965
Fix memory leak when realloc() fails.

Change-Id: I8f7fb3ce7f43de03f76e8f0ee14277d79a55ee63
Reviewed-on: https://review.haiku-os.org/c/1005
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-03 18:05:55 +00:00
Murai Takashi
6c67c7d635 support/String: Fix PVS 626
Fix memory leak when realloc() fails.

Change-Id: I5b44df57bdd251e5164938ed70412c909ce09df1
Reviewed-on: https://review.haiku-os.org/c/1004
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-03 18:05:55 +00:00
Augustin Cavalier
e5d0c9094d BView: Add a B_SCROLL_VIEW_AWARE flag.
* This indicates the view will manage whatever scrollbars are targeted
   to it.
 * Use _B_RESERVED7_ for this. It's been RESERVED since BeOS R5
   (I guess it was probably something on some older BeOS version?)
   and we don't really care about BeOS R4 ABI compatibility, so
   that should be fine.
 * Update BScrollView to not touch BScrollBar range/proportion
   when the target view has this set.
 * Update BListView to set this flag, always.

Fixes #14871.

Change-Id: I17027f3b63ef28da1e735c5393593496c415dce3
Reviewed-on: https://review.haiku-os.org/c/998
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-03 18:04:13 +00:00
Rob Gill
b073a8c83f apps/autoraise Restore functionality
* Restore functionality / compilation
		(C++11)Spacing issues with string macros fixed.
		Fix type declarartion for removeFromDeskbar so compiles
		on x86_64.

	* Code format cleanup

	* Remove DANO related code

Change-Id: I738d14914e320b7606210d8263065187b2c06b1a
Reviewed-on: https://review.haiku-os.org/c/898
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-03 18:03:50 +00:00
Augustin Cavalier
3493fcb668 headers/kernel: Add argument names to initialization functions. 2019-02-02 18:10:54 -05:00
Augustin Cavalier
fa03522846 libroot: Revert changes to hide BeOS-only functions.
I wasn't thinking correctly when I made the previous change --
init_term_dyn is compiled into all applications, and so these
functions need to remain in order to not break them.
2019-02-02 18:09:28 -05:00
Augustin Cavalier
89b5768731 network/hostname: Mark as a "service"-type.
It is technically the "reverse" of DNS settings, which are also
classified as a "service", so they should go together.
2019-02-02 17:29:52 -05:00
Augustin Cavalier
15a4183640 libroot: Move some BeOS-only API calls behind _BEOS_R5_COMPATIBLE_.
This is defined by our build system on GCC2 only, so they will now
be excluded under all other architectures.
2019-02-02 14:36:26 -05:00
Augustin Cavalier
06d77ca653 libnetwork: Remove not-so-useful printf.
We don't really need to see in syslog when an application is
running in R5 compatibility mode.
2019-02-02 14:20:16 -05:00
Augustin Cavalier
8270254464 libnetwork: Rename find_own_image() to set_own_image_location().
Thanks Axel for the review!
2019-02-02 14:01:30 -05:00
Augustin Cavalier
d65ffc926c libnetapi: Remove __gNetAPIStart.
Not used by anything.
2019-02-02 13:26:18 -05:00
Augustin Cavalier
67ef9f72fc network: Utilize image_id argument to initialize_before.
We don't need to search for our own image_id, we already have it now,
so just use it.
2019-02-01 20:33:41 -05:00
Augustin Cavalier
c5e4e4ffb4 headers/kernel: Include declarations of initialization functions in image.h.
No "real" functional change, but this causes GCC7 to throw errors when
these functions are declared without the image_id argument, which
in some files they were (as this commit repairs.)

This change is largely inconsequential on x86, but on callee-cleanup-args
targets, leaving out the argument would probably cause stack corruption.
2019-02-01 20:30:39 -05:00
Augustin Cavalier
d545ad17ce headers/kernel: Define B_CURRENT_IMAGE_SYMBOL via __func__.
Previously, __haiku_init_before was a symbol that was included in
each (shared) object, and so it could be used to determine what
one we were in. Now, there are no such universal symbols that
are declared private to only the object, so we have to use
a different approach.

__func__ is defined as a const char* at the very beginning of
every function it's used in, set to a string of the function name
only, i.e., the arguments and return type are left off. So while
including that is perhaps not quite optimal, in practice this
definition is used extremely rarely (it was introduced by Haiku,
and it is used in only 2 applications at all that I could find --
WebKit and Canna.)

There really isn't any other way to get a pointer that we know
for certain is within the current object besides this one
without inserting one, but that really isn't merited just for this.
(__builtin_return_address() has problematic semantics wrt. inlining,
including linker-inlining.) So this will have to do.
2019-02-01 20:24:31 -05:00
Augustin Cavalier
475172337b headers/kernel: Move B_WAIT_TILL_LOADED to a syscall header.
It is only used as an argument to _kern_load_image directly, not to
any of the load_image functions in image.h, so it belongs in a syscall-
specific header like other such constants.

No functional change intended.
2019-02-01 19:45:56 -05:00
Augustin Cavalier
04b9fbfdfa headers/kernel: Clean up image.h.
* Add missing whitespace.
 * Remove definition of the now-gone __haiku_init_before.

No functional change intended.
2019-02-01 19:20:25 -05:00
Augustin Cavalier
a396188f23 BSound: Add explicit cast to bigtime_t.
Fixes the GCC2 build.
2019-02-01 11:30:08 -05:00
CodeforEvolution
aad79bda85 Implement Duration() in BSound
Change-Id: I45244cd958acd7856a065af01625d2164b9ad033
Reviewed-on: https://review.haiku-os.org/c/963
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-02-01 15:49:07 +00:00
Rob Gill
5186fb7ebd Network: Avoid DHCP over-writing user specified DNS settings
* Adds parser to servers/net/nethost, to check current
   settings in resolv.conf before updating

   If user has specified DNS settings manually, DHCP derived
   settings are appended to resolv.conf, rather than overwriting.

   (If no user specified data is present, or in the event of
   a badly damaged resolv.conf, DHCP over-writes file in same
   manner as prior to this change)

Fixes #11565.

Change-Id: I43464909009d2416d57f66f7bd14d13c81f803e7
Reviewed-on: https://review.haiku-os.org/c/997
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-02-01 08:59:48 +00:00
Augustin Cavalier
f7e2391702 XHCI: Use InitKernelAccess/PrepareKernelAccess properly.
* Actually check return codes of InitKernelAccess().
 * WriteDescriptorChain accesses the memory in the IO vectors, so
   we need to PrepareKernelAccess before calling it.

Fixes #14752.
2019-01-31 22:48:04 -05:00
Augustin Cavalier
32d4274178 kernel/team: Use a rw_spinlock to guard the sTeamsHash.
Virtually identical to my prior change to sThreadsHash.
2019-01-31 20:09:10 -05:00
Augustin Cavalier
5796ecc706 kernel/thread: Add proper permissions checks.
* Add a utility thread_check_permissions(), which takes the target
   thread, the calling thread, and whether or not this is a "kernel" call,
   and then returns whether the target thread may be legally modified.
 * Refactor all calls that operate by sending a signal to the thread
   into a single thread_send_signal() utility function, which now uses
   thread_check_permissions() appropriately.
 * Manually add the permissions checks to other functions as needed.

Solves a bunch of decade+-old TODOs.
2019-01-31 20:05:39 -05:00
Augustin Cavalier
d745129c7a kernel: Mark TeamThreadTable::GetIterator() const.
We use it only while holding a "read" lock, so it must be.
2019-01-31 20:03:28 -05:00
Augustin Cavalier
8140719777 WebPositive: Use spinners for font size options.
Fixes #14845.
2019-01-29 13:31:09 -05:00
Humdinger
e705c841d7 Fix URLs in the development docs
* Fix dead links where possible
* Use online instead of local links to the BeBook

Change-Id: I250117dcccc0026925c56545cca7e3b4467f2c78
Reviewed-on: https://review.haiku-os.org/c/811
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-01-29 16:12:55 +00:00
Rob Gill
80cdc887fa apps/pulse Fix PVS-2010
*	Replace unformatted printf with puts

	*	removed extraneous spaces

Change-Id: I5c707a22dca703bf6a594ab6e85dc2c24bc3911a
Reviewed-on: https://review.haiku-os.org/c/966
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-01-29 16:11:52 +00:00
Rob Gill
d27546c10f kits/interface Fix PVS902
*	replace unformatted printf with puts

Change-Id: I06b5f436bf51423c60ddd3cc81d86217d06c78cd
Reviewed-on: https://review.haiku-os.org/c/961
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-01-29 12:20:56 +00:00
Rob Gill
d7e7e13c67 apps/networkstatus Fix PVS966
*	replace unformatted printf with puts

	*	also add translation for one error message

Change-Id: I48f65af633a39c5f7d4ab359ec8b648c9b869fd4
Reviewed-on: https://review.haiku-os.org/c/962
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-01-29 12:20:00 +00:00
Rob Gill
b726920e3f apps/codycam Fix PVS1347,1348
*	Replace unformatted printf with puts

Change-Id: If4e41bbc58e8a03fdcbee3f2d2efc0a9ff9fc2a2
Reviewed-on: https://review.haiku-os.org/c/965
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-01-29 12:18:43 +00:00
Rob Gill
2f8e8732e1 mime_db Add additional disk image types
*	Two disk image types added to the mime_db with sniffer rules

		1	x-intel-image as a generic type for images using an intel
		partition style boot sector
		2	x-ntfs-image a specific type for ntfs format image files

		Default handler for these types is set to mountvolume, which
		handles ntfs and fat images detected by these sniffers,
		in the same manner as bfs images detected by x-bfs-image.

Change-Id: I994fa23bcc988c40a098aa106587e75d9e1f9b4b
Reviewed-on: https://review.haiku-os.org/c/964
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-01-29 07:28:35 +00:00
Rob Gill
434c347111 headers/libs/agg Fix PVS 33
* Fix successive assignment of 'da'

	* also trailing whitespace removal

Change-Id: Ic127150c18c042839d4104ccc5830adf19550399
Reviewed-on: https://review.haiku-os.org/c/954
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-01-29 04:04:01 +00:00
Rob Gill
d1f885b435 headers/libs/agg Fix PVS 11, PVS12
* Replace hard-coded math constants with M_SQRT1_2
	(math.h was already included)

	* also trailing whitespace removal

Change-Id: I5e9511060d2f812830f7621bee3aff9a517576e5
Reviewed-on: https://review.haiku-os.org/c/956
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-01-29 04:02:25 +00:00