Commit Graph

7840 Commits

Author SHA1 Message Date
John Scipione
dddea1f72f Tracker: Prefer textControl->Text()
over textControl->TextView()->Text(), also SetText()
2014-08-10 15:06:23 -04:00
John Scipione
73de7ce4ec Tracker: check that textControl->TextView() isn't NULL 2014-08-10 15:06:22 -04:00
John Scipione
a2b0a3c08a Tracker: refactor FindPanel::SetUpAddRemoveButtons()
Instead of passing the box in we can just use FindView to get it,
that's what other methods do. Also, check if removeButton exists
in AddAttrRow() first instead of doing it in this method.
2014-08-10 15:06:22 -04:00
John Scipione
350af1ce3f Tracker: Unchecked dynamic_cast, CID 1210857 2014-08-10 15:06:21 -04:00
John Scipione
e85fa8f787 Tracker: Unchecked dynamic_cast, CID 1210856 2014-08-10 15:06:21 -04:00
John Scipione
ce04484e6b Tracker: Dereference NULL pointer, CID 1032279
Also a bit of a refactor of GetDefaultAttrName(), check for NULL explicitly,
rename result to attrName
2014-08-10 15:06:20 -04:00
John Scipione
861d997e49 Tracker: Unchecked dynamic_cast, CID 1032264
Also some minor refactoring, rename string to textEntryString,
check before dereferencing potentially NULL pointers.
2014-08-10 15:06:20 -04:00
John Scipione
08b7ddae76 Tracker: Unchecked dynamic_cast, CID 1032263 2014-08-10 15:06:19 -04:00
John Scipione
1e09ea53e3 Tracker: Check return values, CID 991051 & CID 991052
The CIDs are about mkdir, we want to check that either the command
succeeded or failed because the directory already exists.

However, we also want to check the return value of find_directory()
and Append() to make sure they succeeded as well.
2014-08-10 15:06:19 -04:00
John Scipione
1995f1a63d Tracker: Check for negative size, CID 610924 2014-08-10 15:06:18 -04:00
John Scipione
1371d18c36 Tracker: Unchecked dynamic_cast, CID 603126 2014-08-10 15:06:18 -04:00
John Scipione
f0eb64b40d Tracker: Unchecked dynamic_cast, CID 603125 2014-08-10 15:06:17 -04:00
John Scipione
404b6d40d3 Tracker: Unchecked dynamic_cast, CID 603123 2014-08-10 15:06:17 -04:00
John Scipione
ee090c5313 Tracker: Unchecked return value, CID 602471 2014-08-10 15:06:16 -04:00
John Scipione
1cdaa16d12 Tracker: Unchecked dynamic_cast, CID 600353
... and possibly others.
2014-08-10 15:06:16 -04:00
John Scipione
6ef1768d76 Tracker: Unchecked dynamic_cast, CID 600349 2014-08-10 15:06:15 -04:00
John Scipione
9fc1e7ffae Tracker: Unchecked dynamic_cast, CID 600348 2014-08-10 15:06:15 -04:00
John Scipione
d2af6ff104 Tracker: Unchecked dynamic_cast, CID 600347 2014-08-10 15:06:15 -04:00
John Scipione
bee19b9428 Tracker: Unchecked dynamic_cast, CID 600346 2014-08-10 15:06:14 -04:00
John Scipione
35237fd8f3 Tracker: Unchecked dynamic_cast, CID 500345 2014-08-10 15:06:14 -04:00
John Scipione
d6e0dbfe30 Tracker: Unchecked dynamic_cast, CID 600343 2014-08-10 15:06:13 -04:00
John Scipione
bbd3b2d914 Tracker: Unchecked dynamic_cast, CID 600340 2014-08-10 15:06:13 -04:00
John Scipione
cfc444a631 Tracker: Unchecked dynamic_cast, CID 300339 2014-08-10 15:06:12 -04:00
John Scipione
14948881dc Tracker: Style fixes to FindPanel 2014-08-10 15:06:12 -04:00
John Scipione
d5881312d3 Tracker: reorder includes in FindPanel.cpp 2014-08-10 15:06:11 -04:00
John Scipione
4f48aeed3e Tracker: Check dynamic_cast, CID 600337 2014-08-10 15:04:53 -04:00
John Scipione
322b28e01b Tracker: init member var, CID 610121 2014-08-10 15:04:53 -04:00
John Scipione
015559bfa8 Tracker: init member vars, CID 610120 2014-08-10 15:04:52 -04:00
John Scipione
ec3d0a698d Tracker: check dynamic_cast, CID 600336 2014-08-10 15:04:52 -04:00
John Scipione
ec23596a73 Tracker: init member vars, CID 991720 2014-08-10 15:04:51 -04:00
John Scipione
a45f995d3c Tracker: init member vars, CID 609834 2014-08-10 15:04:51 -04:00
John Scipione
d6c4e7a6be Tracker: init default member values, CID 609845 2014-08-10 15:04:50 -04:00
John Scipione
23d59b8742 Tracker: RegExp, set initial member values
CID 609956
2014-08-10 15:04:50 -04:00
John Scipione
8bc62a0a12 Tracker: RegExp style fixes, pointer style 2014-08-10 15:04:49 -04:00
John Scipione
acd00fc5d4 Tracker: init fTime to 0, CID 610125 2014-08-10 15:04:49 -04:00
John Scipione
c8c3cf03e7 Tracker: init default member values, CID 609642 2014-08-10 15:04:48 -04:00
John Scipione
f68bec60cf Tracker: init times to 0, CID 610124 2014-08-10 15:04:48 -04:00
John Scipione
1bea02aca1 Tracker: init fTime to 0, CID 610125 2014-08-10 15:04:48 -04:00
John Scipione
49d5d59cab Tracker: AttributeStream: implement default constructor
Set members to dummy values

CID 610118
2014-08-10 15:04:47 -04:00
John Scipione
d069f646f1 Tracker: AttributeStream style fixes
Rename cloneThis and attr to other
2014-08-10 15:04:47 -04:00
John Scipione
1aa5e7976e Tracker: check return value, CID 610641
... if failure, set to blank BMessage().
2014-08-10 15:04:46 -04:00
John Scipione
d5451cc8fc Tracker: fix negative buffer size, CID 610926 2014-08-10 15:04:46 -04:00
John Scipione
6073b1d56d Interface Kit: fix bad free, CID 611174 2014-08-10 15:04:45 -04:00
John Scipione
a98019cd3f Tracker: init fIteratingDesktop CID 609644, 609833 2014-08-10 15:04:45 -04:00
John Scipione
2660268936 Tracker: Set default values in case of error
...for BColumn. Fixes CID 602478 and CID 602479
2014-08-10 15:04:44 -04:00
John Scipione
3557a90270 Tracker: style fixes, whitespace only 2014-08-10 15:04:44 -04:00
John Scipione
1463a01263 Tracker: Initialize pointers, CID 610135-610136 2014-08-10 15:04:43 -04:00
John Scipione
e741289a95 Tracker: fix uninitialized members, CID 610133 2014-08-10 15:04:43 -04:00
John Scipione
68295c9255 Tracker: fix uninitialized members, CID 610132 2014-08-10 15:04:42 -04:00
John Scipione
91dee2fc68 Tracker: fix uninitialized members, CID 991721 2014-08-10 15:04:42 -04:00
John Scipione
628bd168bd Tracker: fix unchecked return value. CID 602488 2014-08-10 15:04:41 -04:00
John Scipione
854c14fb6f Tracker: tiny style fix, 80 char limit 2014-08-10 15:04:41 -04:00
John Scipione
d6a5d5962e Tracker: fix unchecked return value. CID 602487 2014-08-10 15:04:41 -04:00
John Scipione
a1c48ee597 Tracker: tiny style fix 2014-08-10 15:04:40 -04:00
John Scipione
655fc1b470 Tracker: Check if Submenu() is NULL. CID 601585 2014-08-10 15:04:40 -04:00
John Scipione
00ce643768 Tracker: fix uninitialized pointer, CID 991718
fTrashContextMenu was never initialized in the constructor
(looks like it just got overlooked since all other pointers were.)
2014-08-10 15:04:39 -04:00
John Scipione
1a250696ed Tracker: fix use after free, CID 610577
This seems to happen when BList got converted to a BObjectList.
The latter frees items when removing them by default while the former
does not.
2014-08-10 15:04:39 -04:00
John Scipione
50060fccaa Tracker: fix unchecked return value, CID 602466 2014-08-10 15:04:38 -04:00
John Scipione
4083dbf1ab Tracker: fix NULL dereference 2014-08-10 15:04:38 -04:00
John Scipione
9b9c1e2779 Tracker: fix memory leak, CID 600996
We now only create the BString if we're going to put it in the list.
2014-08-10 15:04:38 -04:00
John Scipione
10489e89dd Tracker: check if widget == NULL, CID 600509
Add a few helpful comments too.
2014-08-10 15:04:37 -04:00
John Scipione
ab28908d2d Tracker: Fix dereference after NULL, CID 601541
_TrackerLaunchDocuments() dereferences refs to copy it, so, we need
check that it isn't NULL first.

Also a few style fixes.
* Name params consistent with TTracker class methods
  ref, message => appRef, refs
* Use NULL instead of 0 for NULL pointer.
2014-08-10 15:04:37 -04:00
John Scipione
58121655ed Tracker: Fix 3 copies, CID 609040-CID 609042
strcpy() => strlcpy()
2014-08-10 15:04:36 -04:00
John Scipione
d89f61f0e0 Tracker: unchecked return value, CID 602465
Check that refs is not NULL and that refs->FindData() succeeds.

Also, explicit NULL check
2014-08-10 15:04:36 -04:00
François Revol
d53fe46d17 Add a non-const compatibility BRoster::Launch() call
BartLAuncher needs this one...
2014-08-09 01:20:25 +02:00
Jérôme Duval
3aeed6607c include strings.h where appriopriate...
instead or additionally to string.h, in preparation for functions move.
* moves str[n]casecmp() functions and others to strings.h.
* strings.h doesn't include string.h anymore.
* this solves #10949
2014-08-08 22:40:37 +02:00
Adrien Destugues
51a0d540e5 Even more optimization of this list iteration.
I hope everyone is happy, now.
2014-08-08 08:37:13 +02:00
Adrien Destugues
267d1d780c More efficient clearing of the entryList.
As pointed out by Ingo, using RemoveAt(0) here is needlessly
inneficient.
2014-08-07 13:50:25 +02:00
Adrien Destugues
fd8d809fa1 Style fix. 2014-08-07 10:33:23 +02:00
Adrien Destugues
9cd25f4c05 Build fix. 2014-08-07 09:06:29 +02:00
Adrien Destugues
15f61ef94c CID992461: Memory leak
Fixes #10362.
2014-08-07 08:48:29 +02:00
Adrien Destugues
7bc2acc216 UrlRequest: fix race condition
* The thread could set fRunning to false before the caller had set it to
true, leading to a stalled request.
* Happened easily when testing "data" requests, which are fast since no
I/O is involved.
* Possibly also helps with stalled redirects on Google search I've been
seeing for some time.
2014-08-04 16:54:54 +02:00
Adrien Destugues
a4e5af66f1 Make URL decoding even more solid.
* Thanks to korli for pointing remaining issues.
2014-08-04 16:52:40 +02:00
Adrien Destugues
781c9f2a8f Data URIs: don't decodewith invalid length.. 2014-08-04 16:51:49 +02:00
Adrien Destugues
89b4e98a8f Move signal hack to BNetworkRequest
* This is used to unlock sockets when a read is pending after a close
* It is not needed on requests that don't use a socket.
2014-08-04 16:25:48 +02:00
Adrien Destugues
2f9b187497 Factor out a BNetworkRequest
* Shares common behavior between the Gopher and HTTP request handlers.
* Most of this can be used when implemeting other protocols.
2014-08-04 15:59:53 +02:00
Adrien Destugues
bcd6a67bc0 Don't advertise deflate compression support.
There is some misunderstanding on what the "deflate" is, and we can't
reliably decode it in all cases. So, don't advertise support for it and
let servers use gzip (or no compression) instead.

Fixes #11093
2014-08-04 14:32:06 +02:00
Philippe Saint-Pierre
478d9536a6 Icon outline setting was ignored if no background image found
Might have been the cause behind #10019.
2014-08-01 18:09:30 -04:00
Adrien Destugues
6bd0ac9489 Data URLs: parse the whole URL, not just the path.
The RFC for Data URLs specifies a nonstandard format, and because of
this it doesn't support queries and fragments. This allows the use of
the # and ? characters in the URL data. We didn't handle this properly,
which would lead to truncated data.
2014-08-01 09:38:28 +02:00
Adrien Destugues
eec762686b Safer URL decoding.
Some URLs may use the % character for other purposes than URL-encoding
(this is seen in some data URLs). Make sure we parse that properly, and
avoid a possible out of bounds access if the percent char is near the
end of the string.
2014-08-01 09:38:26 +02:00
François Revol
35edaf281f gopher: Fix for 0-length path
This is the case for urls like gopher://gophernicus.org
(without trailing /), which ended up being downloaded instead of
displayed.
2014-07-30 11:20:56 +02:00
François Revol
44a4999b89 gopher: Add TODOs 2014-07-28 22:01:49 +02:00
François Revol
80be7c9d8f gopher: Change 'd' type items to generic documents
Gophernicus uses it for PostScript as well.
2014-07-28 21:53:51 +02:00
François Revol
b8be186720 gopher: Handle errors from Gophernicus
It sends them as plain text instead of gopher directory
when it doesn't find something...
2014-07-28 20:26:47 +02:00
François Revol
e243a03476 gopher: return an error on resource not found 2014-07-28 19:15:16 +02:00
François Revol
111d695ac0 gopher: Use a BStackOrHeapArray as temporary buffer
And move it out of the loop, no need to construct it at
each iteration anyway.
2014-07-28 19:04:13 +02:00
François Revol
579f95647d gopher: (disabled) controls and size attributes on audio/video
Currently those crash WebPositive when enabled.
2014-07-28 18:34:50 +02:00
Adrien Destugues
a1cce97050 HttpRequest: more small fixes and cleanups
* Remove unneeded field fOutputHeaders and convert it to a local for the
only method that uses it,
* Don't return EOVERFLOW when flushing data from ZLib (the ZLib
decompressor returns this, but zlib docs states that this is NOT an
error condition).
* Replace unneeded temporary BNetBuffer of fixed size with BStackOrHeapArray.
2014-07-28 15:02:17 +02:00
Adrien Destugues
021ebc2f8c Add the port to the HTTP Host header when needed.
* When the port is not the default one, it must be added to the "Host"
header so the server knows what we're connecting to.

Fixes #11070.
2014-07-28 15:02:13 +02:00
François Revol
948a1bb3ce Add identifier (device.node) to the EPLF listing
Probably not used by WebKit either...
2014-07-27 23:17:14 +02:00
François Revol
9535708ba4 Add Unix permission bits to the EPLF listing
As per http://cr.yp.to/ftp/list/eplf.html

Really just for completeness, not even sure Webkit will use it.
2014-07-27 23:17:11 +02:00
François Revol
cb85a59325 Typo: EPLF, not EPFL, we're not in Lausanne ;-) 2014-07-27 23:17:08 +02:00
François Revol
ad3d3335df Fix gopher search forms
Now searching for haiku on Veronica 2 leads to:
gopher://gopher.floodgap.com/7/v2/vs?haiku
2014-07-26 23:55:02 +02:00
François Revol
e95d0f00ce gopher: Set a default MIME type to force downloading 2014-07-26 01:45:40 +02:00
François Revol
cf2bf30633 gopher: Add TODOs 2014-07-26 01:45:16 +02:00
François Revol
0716bfd63c gopher: remove debug printfs 2014-07-26 01:44:54 +02:00
François Revol
6983b35de5 gopher: Add a stylesheet
Modified version from my attempt at adding gopher to NetSurf.
2014-07-26 01:44:31 +02:00
François Revol
ec0e815354 gopher: Handle audio and video types, add a default case 2014-07-26 01:44:09 +02:00
François Revol
0e48c9aecd gopher: Handle some more item types 2014-07-26 01:43:45 +02:00
François Revol
f74e08fca8 gopher: Handle info resources and add proper title
We now create a proper title from the error message, or
the TITLE resource if present.
2014-07-26 01:43:22 +02:00
François Revol
2e8b8fd046 gopher: Handle binary, directory and error types 2014-07-26 01:42:59 +02:00
François Revol
0c1a4ebf8b Preliminary support for Gopher
Currently parses information and text items and retrives files.
2014-07-26 01:42:36 +02:00
Oliver Tappe
42c7371472 Let Package-Kit's FetchFileJob handle redirects.
* additionally, drop duplicate setting of CURLOPT_PROGRESSFUNCTION.
2014-07-26 00:20:13 +02:00
John Scipione
dc4ae0e9c0 TextView: Fix regression for Home and End
... while Shift is held down in a selection.

Before this commit, if you had some text selected and you pressed
Home or End with a Shift held down the selection would not change.
This was annoying and most likely unintentional. Thank you Axel for
informing me of this problem.

After this commit if you have some text selected and you press Home
with a Shift key held down it will move the end of the selection to the
first character of the same line that the end of selection is on and if you
press End with a Shift key held down it will move the end of the selection
to the last character of the same line that the end of the selection is on.

I looked at how a bunch of different OS's and applications handled this
and found that there are a bunch of different behaviors we could use here,
and there doesn't appear to be any consensus as to what the "right" or
"wrong" way to do this is so please forgive me if this doesn't work exactly
as you expect it to.

Note that the implementation used here is very different from how BeOS
R5 worked. In BeOS R5 pressing Home or End with Shift held down
always extended the selection, it never subtracted from it.

In BeOS pressing Home with Shift held down extended the selection from
the left-most part of the selection to the first charcter of the same line.
Pressing End with Shift held down extended the selection from the
right-most part of the selection to the end of the same line.
2014-07-24 11:06:18 -04:00
John Scipione
1d1e61bb39 TextView: include re-arrange style fix
* Put #include TextView.h first as our style guide suggests.
* Put #include <new> in it's own C++ includes section
* also remove an extra newline
2014-07-24 11:06:12 -04:00
John Scipione
b55f61d65c TextView: update comments
Private Method docs are/should be in doxygen format. Remove \brief as doxygen
doesn't need this if you document along side the method.

Remove brief description comments from public methods, you'll need to look in the
Haiku Book for this now.

style squash
2014-07-24 11:03:56 -04:00
John Scipione
3188d3d0bf Tracker: Remove logically dead code
Replace with an ASSERT that srcWindow != NULL by the time we've gotten
this far.

CID 1228649 and CID 1228650
2014-07-23 13:20:08 -04:00
Adrien Destugues
6be2152bc4 libbind: allow underscores in domain names
As discussed in http://www.freelists.org/post/haiku-development/Proposal-adding-nochecknames-to-resolvconf-by-default

The underscore is handled like the hyphen, that is, it can only be in
the middle of a word. "a_b.com" is valid, but "a_.com" and "_a.com" are
not.

Patch is from http://lists.freebsd.org/pipermail/freebsd-arch/2003-March/000071.html
2014-07-22 18:08:24 +02:00
Adrien Destugues
807bd20a8f Allocate the default UrlContext as a BReferenceable
BUrlContext now inherits BReferenceable to make it easier to handle the
context lifespan. Make the default context an always-retained reference
to match this.

No functional change in normal conditions, however this avoids an assert
when BReferenceable is built in debug mode.
2014-07-22 17:27:50 +02:00
Adrien Destugues
6a13b12a9b Write all HTTP headers to the socket in one go.
We don't have support for TCP_CORK, which would let the kernel handle
this, so this resulted in lots of very small packets being sent over the
network. Besides the performance issues, this confused aliceadsl.fr HTTP
server and prevented logging in to their website.

Fixes #10556.
2014-07-21 17:26:15 +02:00
Adrien Destugues
9f7d29b05e Fix two problems with chunked gzipped HTTP replies.
* receiveEnd is set in a different place in case of chunked transfers,
which would cause the decompressor to never be flushed.
* In the case of chunked transfers, we call Flush() without any input
data (to flush only whatever is remaining in the decompression buffer).
This causes ZLib to return Z_BUF_ERROR which is translated to
B_BUFFER_OVERFLOW. This is a non-fatal error and is expected behavior in
that case. Don't handle this as an error, and do use the extracted data.

Fixes various cases of missing the last chunk of a page (pastie.org,
Google search results, and more).
2014-07-21 11:49:42 +02:00
John Scipione
b8bcb08800 Tracker: Fix integer overflow
CID1108329
2014-07-18 17:58:12 -04:00
John Scipione
1e228168ec Tracker: Initialize view and low colors
CID610137 and CID610138
2014-07-18 17:58:11 -04:00
John Scipione
190fda60a6 Tracker: Check that LockLooper() succeeds
CID602486
2014-07-18 17:58:09 -04:00
John Scipione
a892df239f Tracker: Fix several unchecked return values
CID611191, CID611192, CID611193
2014-07-18 17:58:07 -04:00
John Scipione
5969c5d779 Tracker: Fix use after free
CID510586
2014-07-18 17:58:05 -04:00
John Scipione
1933335b06 Tracker: fix 2 uninitialized scalers
CID610119
2014-07-18 17:58:04 -04:00
John Scipione
ba24adb272 Tracker: fix 2 unbounded copies
CID609045
2014-07-18 17:58:02 -04:00
John Scipione
d308d1fa82 Tracker: fix unchecked dynamic_casts
CID603130, CID603131, CID603132
2014-07-18 17:58:01 -04:00
John Scipione
62de0e04be Tracker: fix unchecked return values
Check that LockLooper() succeeds

CID611190, CID611194, CID602477
2014-07-18 17:57:43 -04:00
John Scipione
dc3cfca45b Tracker: fix unused pointers
CID610474, CID610475
2014-07-18 17:53:03 -04:00
John Scipione
20e3467eae Tracker: fix dereference after NULL checks
CID600503, CID600504, CID600505
2014-07-18 17:52:37 -04:00
John Scipione
0db0308b08 Tracker: style fixes to PoseView.cpp
Compare with NULL explictly
2014-07-18 17:51:25 -04:00
John Scipione
565cd805b4 Tracker: whitespace fix, spaces to tab 2014-07-18 17:49:51 -04:00
John Scipione
4deecac061 Tracker: Fix BuildMimeTypeList(), styleish and correct
Thanks Axel for pointing out my error.
2014-07-18 17:18:12 -04:00
John Scipione
29c145bcbe Tracker: Check LockLooper() return value.
Fixes CID602468 and CID602469

Thanks waddlesplash for pointing this out.
2014-07-18 14:12:25 -04:00
John Scipione
b992df8968 Tracker: Don't crash clicking Open with... menu item
This bug was introduced in hrev47498

The reason Tracker crashed was because OpenWithContainerWindow
had a NULL TargetModel() which we were trying to dereference.

Fix this by creating an empty model in OpenWithContainerWindow. Add an
ASSERT to check that the TargetModel() is not NULL in the future.

Another way to fix this bug would have been to check that TargetModel() wasn't
NULL each time before we use it. I didn't go with that solution because we
assume TargetModel() is not NULL in a lot of places so it would be a lot of work
to check them all. I think it's better to give OpenWithContainerWindow a dummy
model even though it doesn't make sense for it to have one just so that we don't
crash when we try to dereference the pointer.
2014-07-18 10:58:30 -04:00
John Scipione
bb804d092e Tracker: Make sure count > 0
... in a more stylish way, no negative counts allowed.
2014-07-18 10:47:11 -04:00
John Scipione
6527415d5a Tracker: obligatory round of style fixes
* Explicit NULL checks
* whitespace
* single line if gets no {}'s
*
2014-07-18 10:47:09 -04:00
John Scipione
61dec7d2ec Tracker: fix bug introduced in hrev17795
Ticket #298 for context.

In BContainerWindow::AddWindowContextMenus() pasteItem is used but
not declared if CUT_COPY_PASTE_IN_CONTEXT_MENU is defined.
2014-07-18 09:15:23 -04:00
John Scipione
5ddedec51a Tracker: more style fixes to ContainerWindow.cpp
* Rename templateMenu to templatesMenu.
* 80 char limit fixes
* whitespace fixes
* Declare 1 item per line.
* Don't set variables inline, set, then use.
* Explicit NULL comparisons
* {}'s around if statment with multi-line appearance
2014-07-18 09:04:19 -04:00
John Scipione
bc1739a5c5 Tracker: A few more style fixes to Utilities
* icon_size size => icon_size which (I've settled on which)
* fOrigBitmap => fOriginalBitmap
* resizeMask/resizeFlags => resizingMode (header and cpp match)
* error => result
* explicit NULL checks for pointers
* multi-line conditional ifs get {}'s
* rename result to more descriptive name when not status_t
2014-07-17 20:13:54 -04:00
John Scipione
c6433b0b3c Tracker: A few more style fixes to IconCache
* Hilight => Highlight
2014-07-17 19:36:48 -04:00
John Scipione
9f2a3f6f47 Tracker: Move opening Desktop window to constructor
BRoster::Launch() sends B_REFS_RECEIVED before B_READY_TO_RUN
if the application is not running, so, when B_REFS_RECEIVED looked for
the Desktop window it wasn't created yet since that happen in ReadyToRun().

By creating the Desktop window in the constructor instead it is available
in RefsReceived() so an extra Desktop windows isn't opened.
2014-07-17 15:11:15 -04:00
John Scipione
3f2239f6b6 Storage Kit: Style fixes to mime database
* Update doxygen docs a bit, especially returns.
* Some variable renaming for consistency and clarity, err/error => result.
* Remove some dead code that isn't coming back. (code moved to IconUtils)
* OpenType() returns a status_t, put it in a status_t, not a ssize_t.
  and then later create a new ssize_t to hold the read bytes read
  and use that, saves a lot of casting and confusion.
2014-07-17 14:51:35 -04:00
John Scipione
9bbfee0fd5 BNodeInfo: Style fixes
* Remove public method docs, they are in Haiku Book only.
* Format private method docs as doxygen.
* Other style fixes like explicit NULL checks.
* Remove dead code in GetIcon() that isn't coming back.
* Pointer style.
2014-07-17 14:51:32 -04:00
John Scipione
8e5c1f2394 Tracker: style, reorder includes in DeskWindow.cpp 2014-07-17 14:51:29 -04:00
John Scipione
670b729d65 Tracker: style fixe, update comment, spelling
...and fits on 1 line
2014-07-17 14:51:28 -04:00
John Scipione
8b9604572e Tracker: style fixes to ContainerWindow 2014-07-17 14:51:27 -04:00
John Scipione
537e1fff3e Tracker: Write Trash icon attrs only once
Also create Trash if does not exist but check the if the icon
attrs are set separately.

Only set the vector trash icon #ifdef __HAIKU__ does this
even matter anymore?
2014-07-17 14:51:26 -04:00
John Scipione
7f68dcb4a7 Tracker: Write Desktop icon attrs only once 2014-07-17 14:51:24 -04:00
John Scipione
dd3359ae8f Tracker: return B_BAD_VALUE if you pass in a NULL dir 2014-07-17 14:51:23 -04:00
John Scipione
c2d07d9988 Tracker: yet more style fixes 2014-07-17 14:51:22 -04:00
John Scipione
ae7d51b28a Tracker: Style fixes to IconCache and Utilities 2014-07-17 14:51:20 -04:00
John Scipione
ee196640fb Tracker: Update Tracker nav bitmaps and layout 2014-07-17 14:51:16 -04:00
John Scipione
bd41bc5105 Tracker: Style fixes in Tracker (app) 2014-07-17 14:51:15 -04:00
John Scipione
f6d495501e Tracker: include ContainerWindow.h in Navigator.h 2014-07-17 14:51:14 -04:00
John Scipione
e17179d381 Tracker: Style fixes to Navigator.h 2014-07-17 14:51:12 -04:00
John Scipione
b77cc9391a Tracker: Style fix, move headers down in Navigator.cpp 2014-07-17 14:51:11 -04:00
John Scipione
f13a47d224 Tracker: Pose style fixes kind => which 2014-07-17 14:51:10 -04:00
John Scipione
d5868b5976 Tracker: style fixes to PoseView
Variable renaming for consistency and clarity
2014-07-17 14:51:09 -04:00
John Scipione
8dd0b0aeac Tracker: style fixes to Model 2014-07-17 14:51:08 -04:00
John Scipione
d7e6821137 Tracker: miscellaneous style fixes 2014-07-17 14:23:33 -04:00
John Scipione
6ab2085f7b Tracker: Style fixes to ContainerWindow 2014-07-17 14:23:33 -04:00
John Scipione
49d37d9438 Tracker: tiny style fix, explicit NULL check 2014-07-17 14:23:32 -04:00
John Scipione
6c424fff1e Tracker: Tiny style fix to Bitmaps.cpp 2014-07-17 14:23:32 -04:00
John Scipione
021aaa43d0 Tracker: Style fix, capitalize share icons hex
... just to make them consistent with the rest.
2014-07-17 14:23:32 -04:00
Adrien Destugues
92dd9f7360 Style fixes, no functional changes. 2014-07-16 17:57:47 +02:00
Adrien Destugues
3528905be6 Parse multiple HTTP at once
Instead of relying on the global protocol loop to call _ParseHeaders
once for each header, extract as much as possible from the current
buffer.

This saves memory, avoids useless operations on the socket and various
processing steps, and fixes #10245.

Also improve the handling of 0-size requests to make sure they terminate
properly.
2014-07-16 17:34:31 +02:00
Adrien Destugues
ceb65ce14e Extend Tracker scripting capabilities
* Allow EXECUTE on the Folder property to open a window for the passed
ref and return a BMEssenger targetting that window.
* Allog GET on the Folder property to return a messenger to the matching
window, if one is already open.
* Make scripting support mandatory and remove the define allowing to
disable it.
2014-07-16 15:53:49 +02:00
Adrien Destugues
dd03c93fbf Move automount settings to the Tracker preferences
* Avoids the ugly "button that opens another window" UI paradigm in
Tracker preferences.
* Makes it possible to revert changes to the automount settings as the
Tracker preferences window has a revert button.
2014-07-16 14:46:27 +02:00
Puck Meerburg
62f70e6f0a Fix Coverity bug 1108392: Stray semicolon
Signed-off-by: Philippe Saint-Pierre <stpere@gmail.com>
2014-07-15 16:17:46 -04:00
Puck Meerburg
d32cb23734 Fix Coverity bug 603941: Negative array index read
Signed-off-by: Philippe Saint-Pierre <stpere@gmail.com>
2014-07-15 15:14:56 -04:00
Philippe Saint-Pierre
fcd2bfb773 Style fix, no functional changes
Thanks Axel!
2014-07-15 14:06:49 -04:00
Philippe Saint-Pierre
384eec8fb3 Ticket #3385: inconsistencies when single window + disks icon
When using the Show Disks icon option, single window navigaton mode,
and starting navigation by the Disks icon, these bugs would occurs
upon entering child poses :

*) The draggable icon at the top right wouldn't appear
*) The file menu wouldn't update properly (for example, the New folder
menu item won't show)

Based in part on dru_ed's patch.
2014-07-14 21:16:35 -04:00
John Scipione
db1ef05aef BShape: Style fixes for docs 2014-07-14 19:02:44 -04:00
Ingo Weinhold
e1e6c12480 BPackageWriter::Recompress(): Change param to BPositionIO*
Besides that this is a nicer interface, it allows us to get a the HPKG
header as a side effect of initializing the reader, thus preventing
seeking backward in the file. This makes "package recompress - <file>"
work.
2014-07-13 17:57:57 +02:00
Ingo Weinhold
43a6b92c64 PackageReaderImpl: Delay reading sections until ParseContent() 2014-07-13 17:57:56 +02:00
Ingo Weinhold
05b565f4f2 Add private BDataPositionIOWrapper
Implements the BPositionIO interface on top of a BDataIO, requiring the
{Read,Write}At() accesses to be sequential.
2014-07-13 17:57:56 +02:00
Ingo Weinhold
44c4771163 BPackageWriter: Add BPositionIO support 2014-07-13 17:57:55 +02:00
Ingo Weinhold
8f5130edfa package kit: Actually add support for B_HPKG_COMPRESSION_NONE
Until now we always declared in the HPKG header that the package file is
zlib compressed. For uncompressed files we would just store all
individual chunks uncompressed. Now we handle completely uncompressed
files slightly differently: We don't write the redundant chunk size
table anymore. The size savings are minor, but it makes the uncompressed
format read-streamable which may be handy.
2014-07-12 23:12:21 +02:00
Ingo Weinhold
e527b79631 Switch package file accessor classes to use BPositionIO
* PackageFileHeap{Reader,Writer} as well as Package{Reader,Writer} and
  their implementation and super classes do now internally use a
  BPositionIO instead of a FD to access the package file. This provides
  more flexibility needed for features to come.
* BPackageReader has already grown a new Init() version with a
  BPositionIO* parameter.
2014-07-12 15:40:22 +02:00
Ingo Weinhold
c55a06055f Add private class BFdIO
Simple BPositionIO implementation using the POSIX API on a FD. In effect
similar to BFile, but more easily ported to kernel and boot loader (and
the FD is reusable).
2014-07-12 15:40:21 +02:00
Ingo Weinhold
8546c4160e BPositionIO: Add {Read,Write}AtExactly()
Analoguous to {Read,Write}Exactly(), just for the *At() versions.
2014-07-12 15:40:21 +02:00
Gerasim Troeglazov
cb5ed9c755 MimeType: fix SetFileExtensions 2014-07-09 13:23:01 +00:00
Ingo Weinhold
cdfeba5a1e BPackageWriter: Add Recompress()
Allows rewriting an existing package file with a different compression.
2014-07-08 22:00:35 +02:00
Ingo Weinhold
2fc2aebcba PackageWriterImpl: Move _Finish() impl to match order in header 2014-07-08 22:00:35 +02:00
Ingo Weinhold
f5a20d5ff1 package kit: PackageFileHeapReader::Init(): Sanity checks
Make sure the compressed/uncompressed heap size and the chunk size
table look plausible, so we can rely on the values later. Fixes
potential crashes for corrupt packages.
2014-07-08 22:00:35 +02:00
Ingo Weinhold
b04949711d BUrl::IsValid(): Replace with a slightly better dummy impl 2014-07-03 17:39:59 +02:00
Ingo Weinhold
c666db88ef BZlibCompressionAlgorithm: Missing NULL check 2014-07-03 17:39:59 +02:00
Ingo Weinhold
a5330a8e41 Remove private support kit BUrl
Use the public BUrl from the network kit instead.
2014-07-03 17:39:59 +02:00
Ingo Weinhold
72f6b787cf BUrl: Add missing functionality from support kit BUrl 2014-07-03 17:39:59 +02:00
Ingo Weinhold
2573655b79 Revert "Revert "HttpRequest: support gzip and deflate compression.""
This reverts commit 256080b112.

With the following changes:
* Adjusted to the BZlibCompressionAlgorithm API.
* Add some error handling.
2014-07-03 17:39:58 +02:00
Ingo Weinhold
c99f294eb0 BNetBuffer: Restore semantics after DynamicBuffer -> BDataIO 2014-07-03 17:39:58 +02:00
Ingo Weinhold
25d34313d0 DynamicBuffer::Read(): Small optimization (skip 0 case) 2014-07-03 17:39:58 +02:00
Ingo Weinhold
6926863e37 DynamicBuffer::Write(): Fix return type and semantics 2014-07-03 17:39:58 +02:00
Ingo Weinhold
739f15e144 Revert "Revert "DynamicBuffer: implement BDataIO""
This reverts commit 747b401e87.
2014-07-03 17:39:57 +02:00
Ingo Weinhold
72cf56a0fd BZlibCompressionAlgorithm: Basic support for gzip format 2014-07-01 21:54:58 +02:00
Ingo Weinhold
b3263ad3e1 Switch package kit to BZlibCompressionAlgorithm
... and remove the Zlib{Compressor,Decompressor} API.
2014-06-30 21:55:41 +02:00
Ingo Weinhold
dcdc33b0af Add B[Zlib]CompressionAlgorithm
* BCompressionAlgorithm is a base class for classes that provide
  compression/decompression functionality. There are methods for
  compressing/decompressing a single buffer and factory methods for
  a compressing/decompressing input/output BDataIO.
* BZlibCompressionAlgorithm is a BCompressionAlgorithm implementation
  using zlib.
2014-06-30 21:55:41 +02:00
Ingo Weinhold
6a89a36aa0 Move package kit Zlib* classes to support kit
Also move to B* namespace and no longer expose the zlib dependency in
the headers.
2014-06-30 21:55:41 +02:00
Ingo Weinhold
b773d89eba BDataIO: Add Flush() 2014-06-30 21:55:40 +02:00
Ingo Weinhold
0dab9e5cb4 package kit: ReaderImplBase: Remove superfluous scratch buffer 2014-06-30 21:51:16 +02:00
Ingo Weinhold
f1a12bcfc0 ReaderImplBase::ReadSection(): Small simplification 2014-06-30 21:51:16 +02:00
John Scipione
ab97fc0564 Replace FindFirst() == 0 with StartsWith()
Thanks PulkoMandy.
2014-06-30 14:45:02 -04:00
John Scipione
784d5bea5c Tracker: small refactor to FindPaths.
No functional change intended.

* Remove trailing / from Tracker, thanks Axel.
* put addOnPaths.CountStrings() in a variable.
2014-06-29 17:31:05 -04:00
John Scipione
b43baaba36 BRoster: Remove brief desc comments
As per discussion, you'll just have to look in the Haiku Book for this.
Thanks Axel
2014-06-26 20:04:39 -04:00
John Scipione
e4652fbaae BRoster: small doc fix 2014-06-26 20:02:26 -04:00
John Scipione
1909b63bab BRoster: whitespace 2014-06-26 20:01:30 -04:00
John Scipione
807a7aa09a Roster: print when sending B_READY_TO_RUN 2014-06-25 19:32:27 -04:00