Commit Graph

43012 Commits

Author SHA1 Message Date
Adrien Destugues
2bd9c8a5f9 ShowImage: fix scale-to-fit behavior
* Fix the condition so that big images are fitted to the window on first
time only if the option is set.
* Small images are never stretched to the window size, as this isn't
very useful.

The interaction of this global setting with the zoom buttons is a bit
confusing. Should they be merged?
2014-04-27 18:03:05 +02:00
Adrien Destugues
cb2c4f8d44 Convert more printf to TRACE in media kit. 2014-04-27 18:03:03 +02:00
Jessica Hamilton
f21045a772 Correct B_USER_BOOT_DIRECTORY path. Fixes #10070. 2014-04-27 15:45:40 +12:00
Ingo Weinhold
333d4efe4f packagefs: Extend PACKAGE_FS_OPERATION_GET_PACKAGE_INFOS ioctl
Also return the package file names.
2014-04-26 15:34:18 +02:00
Ingo Weinhold
ba4c67b4b0 packagefs: Fix ioctl PACKAGE_FS_OPERATION_GET_VOLUME_INFO
... in case a larger buffer is provided.
2014-04-26 15:34:17 +02:00
Ingo Weinhold
c8dd5bbd94 package daemon: Retrieve all package directories from packagefs 2014-04-26 15:34:17 +02:00
Ingo Weinhold
7a3253f07c package daemon: Pass volume state CommitTransactionHandler
... and remove the getter from Volume again.
2014-04-26 15:34:17 +02:00
Ingo Weinhold
7a35d803d0 package daemon: Move pending job accounting back to Volume 2014-04-26 15:34:17 +02:00
Ingo Weinhold
fb53533e86 package daemon: CommitTransactionHandler: Use NotOwningEntryRef 2014-04-26 15:34:16 +02:00
Rene Gollent
e10e704441 Debugger: Fix crash in context menu builder.
A value node might not have a location due to e.g. issues resolving its parent.
Guard against this case and simply return early as we won't be able to take any
meaningful actions on such a node. Fixes the second crash listed in #10781.
2014-04-25 21:54:14 -04:00
Guillermo Bonvehi
667cfcdd56 TabView BTab::Select only add child if it doesn't have a parent
Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2014-04-26 12:20:40 +12:00
John Scipione
c620610b98 WebPositive: Add support to show/hide bookmark bar
Default is shown, a menu option in the View menu allows you to show
or hide the bar.

Also move the bookmark bar below the tab frame, it looks better
here I think and matches other browsers (e.g. Firefox.)
2014-04-24 20:02:31 -04:00
John Scipione
fd849a28d9 Background: Make menu fields variable width 2014-04-24 17:14:29 -04:00
Jessica Hamilton
d154bfb517 Fix 64-bit build. Thanks umccullough! 2014-04-25 08:46:45 +12:00
John Scipione
60370b9a6c BMenuField/BTextControl: Store and reuse Label() 2014-04-24 15:31:16 -04:00
John Scipione
b11edca47d BTextControl: style fixes 2014-04-24 15:31:15 -04:00
John Scipione
c79f260276 BMenuField: Check if menuBar is NULL explicitly 2014-04-24 15:31:15 -04:00
John Scipione
d055b93b25 BMenuField: Replace 5 with DefaultLabelSpacing() 2014-04-24 15:31:14 -04:00
John Scipione
58a3b20760 BMenuField: style fixes 2014-04-24 15:31:14 -04:00
John Scipione
c884d017ed BMenuBar style fixes 2014-04-24 15:31:14 -04:00
John Scipione
ca6cc0aa50 BMenu: Replace min_c and max_c
... with std:min and std:max
2014-04-24 15:31:13 -04:00
John Scipione
b7096fd76b BMenu: remove useless default case 2014-04-24 15:31:13 -04:00
John Scipione
cb30cf1423 BMenu: style fixes 2014-04-24 15:31:12 -04:00
John Scipione
a631719fb4 BButton style fixes 2014-04-24 15:31:12 -04:00
Adrien Destugues
c161ea9ac2 WebPositive: add a bookmark bar.
* This is a BMenuBar with IconMenuItems.
* Uses node monitoring to live-update the bar as bookmarks are modified.
* Bookmark folders are BNavMenus and can be browsed.
* This needs some improvements, for example handling more bookmarks than
the window width allows us to show (with an extra menu like for tabs?)

Fixes #10232.
2014-04-24 14:33:54 +02:00
Adrien Destugues
53286932c0 Move IconMenuItem.h to headers/private/tracker.
* This can be useful outside of Tracker, so make it more visible.
2014-04-24 14:33:53 +02:00
Adrien Destugues
84da57fd56 MediaRoster: remove another message to app stdout. 2014-04-24 14:33:52 +02:00
Adrien Destugues
9f97d1cca2 Remove useless include. 2014-04-24 14:33:51 +02:00
Adrien Destugues
1cb5adb698 TabManager: better delay detection for closing the menu.
As suggested by stippi, we can use system_time and the CurrentMessage
when field to determine the relative time of the actual mouse clicks,
rather than the time of message delivery.
2014-04-24 14:33:49 +02:00
Adrien Destugues
422265608e Add a sniffing rule for XML.
* Set to a weak priority, to let more specific rules be used (svg,
xhtml, etc.)
2014-04-24 14:33:48 +02:00
Stephan Aßmus
e08beebef9 HaikuDepot: Work on retrieving more pkg info
* Simple, incomplete JSON string-builder.
 * Not yet using the new bulk information method of the web-app.
 * Not yet parsing the reply and doing anything with it, consequently
   commented out.
 * What works is generating a JSON command and receiving the reply.
2014-04-24 00:21:33 +02:00
Adrien Destugues
179c6ec2fd Remove some traces sent to application stdout.
* This may be fine in media server where it lands in logs, but certainly
not when the code is run in applications.
* Helps with all media-related webkit tests.
2014-04-23 15:13:14 +02:00
Adrien Destugues
804056af27 More tweaks to the HTML related sniffing rules:
* MHTML: give a higher priority than HTML to improve detection results,
as MHTL is likely to contain HTML in the first chunk.
* HTML: scan the first 512 bytes to increase likeliness of finding a tag
* XHTML: don't try to identify on the dectype, this is not reliable and
missing from some documents. Recognize "<html xmlns" and the utf-16
equivalent, as well as part of the DTD tag.
2014-04-23 15:13:12 +02:00
Adrien Destugues
507a03cfe0 Clsoe the tab list menu when clicking the button twice.
The menu was closed, but immediately reopened by the click on the
button. If the time since the menu closing is shorter than a
double-click delay, don't open the menu again.

Fixes #9538.
2014-04-22 16:29:11 +02:00
Adrien Destugues
d62f3e4a33 Forgot to commit this. Fixes the build. 2014-04-22 14:52:48 +02:00
Adrien Destugues
48d90a5092 Notifications: only color the left stripe
* Setting the important/failure color on the whole view looked ugly.
* Important notifications use B_CONTROL_HIGHLIGHT_COLOR, instead of
white.
* We may want to select better success and failure colors. Pure red and
green don't look very good. Suggestions welcome.
2014-04-22 13:46:46 +02:00
Adrien Destugues
567a96acc9 Pop a BNotification on download success/failure.
Clicking the notification opens the downloaded file for succesful
downloads.
Fixes #10689.
2014-04-22 13:31:28 +02:00
Adrien Destugues
976bc77c7c Activate download window when starting a download.
Fixes #9575.
2014-04-22 11:19:08 +02:00
Adrien Destugues
de3e2b5186 BGradient: don't allow out of bounds stops.
* They crash app_server if you try to use them, which is not a good idea.
* we could clamp them to 0/255, but reporting the error to the user
seems better.
2014-04-22 10:45:24 +02:00
Ingo Weinhold
8c6e1bf548 package daemon: Sever Volume-CommitTransactionHandler friendship
Move quite a bit of transaction related methods from Volume to
CommitTransactionHandler.
2014-04-20 11:54:10 +02:00
Ingo Weinhold
933e7b3280 Move Volume::CommitTransactionHandler to top level
Also move constant definitions to Constants.h/cpp.
2014-04-20 11:09:56 +02:00
Ingo Weinhold
273763d052 package daemon: Move Volume::State to top level
... and rename it to VolumeState.
2014-04-20 09:44:01 +02:00
Ingo Weinhold
6cf0a86499 findpaths: Add missing --list long option 2014-04-20 09:44:00 +02:00
Oliver Tappe
94089b909d Revert 6f68e52 and fix the gcc2 build via template.
* Instead of forcing the hash-table to use a copy of the key,
  introduce and use TypeOperation template to avoid taking a
  reference of a reference type (which gcc2 doesn't allow).
2014-04-20 00:26:29 +02:00
PulkoMandy
279c181ab8 Import stdatomic.c from freebsd for ARM port
* Fixes missing atomic stuff that gcc requires
* The gcc build still fails further down, because of a mixup of
VFP/nonVFP objects (at least for beagle build).
2014-04-19 23:44:32 +02:00
Jessica Hamilton
94febdfe87 AboutSystem: use BPathFinder correctly 2014-04-20 01:41:38 +12:00
Jessica Hamilton
07fae11ef8 AboutSystem: use BPathFinder instead of find_directory. 2014-04-20 01:06:06 +12:00
Jessica Hamilton
8173945dc4 AboutSystem: license hyperlinks were missing due to incorrect count 2014-04-20 00:05:17 +12:00
Jessica Hamilton
6f68e52f1f packagefs: BOpenHashTable keys are already reference types. 2014-04-19 22:22:24 +12:00
Jessica Hamilton
57fc26c16b Moved myself to current maintainers list. 2014-04-19 20:50:26 +12:00
PulkoMandy
2c8f0c5015 Fix compile error on 64-bit machines.
* This is built for the host system, so we can't use B_PRIdOFF.
* Until POSIX introduces a format constant for off_t, cast the variable
to long long to avoid a warning.
2014-04-19 10:11:39 +02:00
Pawel Dziepak
744dfa3c4c kernel: make sure thread priority is within valid range
The scheduler expects that all threads expect the initial idle threads
have priority in range [THREAD_MIN_SET_PRIORITY, THREAD_MAX_SET_PRIORITY].
If the requested pririty is out of range the value is clamped. Failing
with B_BAD_VALUE is probably an overkill since there isn't any real
change in the guarantees provided by the scheduler about the behavior
of such thread. Also, BeBook suggests that spawn_thread() can specify
priority 0.
2014-04-18 23:55:18 +02:00
Ingo Weinhold
2d91773d2e Adjust packagefs ioctl interface to support old states
* PackageFSVolumeInfo: Add the directories for all relevant states.
* PackageFSPackageInfo: Include the package file's parent directory node
  ref.

Package daemon and package kit still don't support old states yet.
2014-04-18 23:31:40 +02:00
Ingo Weinhold
5d55f327ed packagefs: Initial support for booting into old states
If an old state is specified via mount parameters we load the packages
as specified in its activated-packages file.

The interface for the package daemon, the package daemon itself, and
the package kit are still to be adjusted, so ATM some PM components
might be a bit confused when an old state was booted.
2014-04-18 23:31:40 +02:00
Ingo Weinhold
6b3a5caf99 VFS: Pass packages state selected in boot loader to packagefs 2014-04-18 23:31:40 +02:00
Ingo Weinhold
8585939dca VFS: Don't try to mount the no longer existing /boot/common packagefs 2014-04-18 23:31:40 +02:00
Ingo Weinhold
5c0f8450ac Boot loader: Add support for choosing an old packages state
For potential boot volumes with older packages states the respective
item in the boot volume menu now has a sub menu for selecting a state.
The boot loader functionality for this feature is complete -- i.e. the
respective kernel is loaded and the name of the old state is added to
the kernel args -- but kernel packagefs and package daemon support is
still missing.
2014-04-18 23:31:39 +02:00
Ingo Weinhold
59881eaa16 Boot loader: Update copyright right in boot menu 2014-04-18 23:31:39 +02:00
Ingo Weinhold
59ae1c816d Boot loader: Add get_stat(), directory_from()
* Add Node::Stat() and simplify Descriptor::Stat().
* Add get_stat() and directory_from().
2014-04-18 23:31:39 +02:00
Ingo Weinhold
2f019bd6ca boot loader: Implement subset of <dirent.h> API
* Add opendir(), closedir(), readdir(), rewinddir().
* Add open_directory(), similar to opendir(), but basing the path off a
  specified directory.
2014-04-18 23:31:39 +02:00
Ingo Weinhold
09c07e4c5c packagefs: PackagesDirectory: Use node_ref 2014-04-18 23:31:38 +02:00
Ingo Weinhold
211c21a592 packagefs: Add support for node_ref 2014-04-18 23:31:38 +02:00
Ingo Weinhold
dff8d2ea22 packagefs: Package: Use PackagesDirectory directly
... instead of Volume. Necessary to support using packages from
different directories.
2014-04-18 23:31:38 +02:00
Ingo Weinhold
aeb6fc9eca packagefs: Move Volume::PackagesDirectory to top level
Also make it a BReferenceable and fix Volume::fPackagesDirectory leak.
2014-04-18 23:31:38 +02:00
Adrien Destugues
34828f7346 Be more flexible in identifying HTML files
Some tests in WebKit have no <html> and no <head>...
* Allow "<style", "<script", and "<a href" to identify HTML
* Scan up to 256 characters instead of 64
* Also remove the rule identifying "<!--", because this really isn't html
specific.
2014-04-18 18:21:04 +02:00
Jérôme Duval
607a620b1c qrencode: use outsourced package
* qrspec.h isn't yet part of the package for some reason.
* removed qrencode from the bootstrap package.
* only include qrencode when the qrencode package is found.
* didn't check qrencode itself, tests welcome.
2014-04-18 18:10:57 +02:00
Jérôme Duval
4a4450c158 less: sysless config file is part of the hpkg.
* remove in-tree sysless config gen.
2014-04-17 23:20:32 +02:00
Jérôme Duval
1a8c694443 less: use the outsourced packages.
* added packages for x86 and x86_64.
2014-04-17 00:03:28 +02:00
Adrien Destugues
0c119984fa Require SVG files to start with <?xml tag
* Makes scanning faster
* Avoids mistaking some html files with embedded SVG as SVG files
2014-04-16 08:39:41 +02:00
Adrien Destugues
3eff063958 WebPositive: let escape close the menu.
* Intercept the escape key to mean "stop loading" only when menus are
closed.
2014-04-15 09:17:56 +02:00
Jérôme Duval
8df3fb7035 Remove outsourced sharutils provides from haiku package. 2014-04-14 23:52:45 +02:00
Jérôme Duval
eb763779e3 sharutils: use the hpkg.
* delete the intree sources.
2014-04-14 22:52:58 +02:00
Gerasim Troeglazov
d68289f7ae NTFS: Update libntfs to 2014.2.15 2014-04-14 11:35:50 +00:00
Adrien Destugues
02cdea9f9d BTab: use ControlLook to draw label.
* Supports disabled tabs like BeOS did: label is drawn with disabled
color, but can still be selected.
2014-04-12 11:37:45 +02:00
Adrien Destugues
4991d3fb52 Fix build. 2014-04-12 09:32:43 +02:00
Adrien Destugues
9b1f41b9c1 AddOnManager: remove more annoying traces. 2014-04-12 08:57:28 +02:00
Adrien Destugues
cfc4b62367 Network Kit: Prepare for HTTP range requests
* The DataReceived hook gets a position argument, making it possible for
listeners to handle out-of-order data (from two range requests at
different positions, for example)
* Adjust HaikuDepot (only user of the API in our sources)
* Add a copy constructor to HTTPRequest that copies the relevant
parameters from an existing request. Makes it easy to repeat a request
with a different range. Could be useful for restarting downloads, or
paralellizing them.
* Add SetRangeStart, SetRangeEnd calls to HTTPRequest, no implementation
yet. I'm putting all the API changes in this commit as it needs to be
synced with a matching haikuwebkit release.
* All archs must update to HaikuWebkit 1.3.0. Previous versions are
broken by this.
2014-04-12 08:57:26 +02:00
Adrien Destugues
5ba7abf8f2 AddOnManager: remove useless traces
These were acceptable in media kit log, but are only annoying now that
the AddOnManager is ran in applications. Moreover, these get to stdout
and make some WebKit tests fail.
2014-04-12 08:57:23 +02:00
John Scipione
ebd3bcdb9b exfat: handle 4-byte UTF-16 surrogate pairs
... in filenames. Replace the existing Unicode conversion functions
with UTF conversion functions from js that he relicensed MIT for us.

Put the UTF conversion functions in a private but shared code location
so that they can be accessed throughout the kernel.

Right now we only provide functions to convert between UTF-8 and UTF-16.
At some point we should also add functions to convert between UTF-8 and
UTF-32 and UTF-16 and UTF-32 but these aren't needed by exfat.

Remove the old Unicode conversion functions from exfat as they assumed
UCS-2 characters and don't work with UTF-16 used by exfat.

Rename most variables with the term length with code unit where code units
are intended. The term length, when used, means length in bytes while code
units represent either a full 2-byte UTF-16 character or half a 4-byte
surrogate pair.
2014-04-11 18:46:03 -04:00
Jérôme Duval
f13c2249b2 scsi_periph: fixed an "unused" warning. 2014-04-11 15:42:25 +02:00
John Scipione
1520fffa4f Time prefs: Use button label symbols & relayout
Add becomes +, Remove becomes −, the current button labels "Add" and "Remove"
are used as tool tips. Relayout the controls so that they fit nicely with the
buttons:

The add button is placed left of the server text control showing that it
adds new server names while the remove button is placed next to the list
view showing that it removes server names from the list.

The reset button is placed next to the "Synchronize" button at the bottom of
the tab group and is renamed "Reset to default server list".

This makes the window a bit taller.
2014-04-10 17:27:38 -04:00
John Scipione
deda8cad48 Time prefs: Set text colors in constructor 2014-04-10 17:27:37 -04:00
John Scipione
15cc2a1fad Time prefs: Set pointer NULL, delete in destructor
... avoiding potential memory leak.
2014-04-10 17:27:37 -04:00
Adrien Destugues
f325986993 FileRequest: identify unknown files.
* WebKit testsuite relies on the MIME types being correct, so when the
file doesn't have one, try to identify it.
* May be useful for other apps using FileRequest, anyway.
2014-04-10 08:51:00 +02:00
Adrien Destugues
a8d8e823ea HttpRequest: handle 302 and 307 redirects.
* Makes jamendo.com player work, as their soundfiles are behind a
temporary redirect for load balancing.
2014-04-10 08:50:59 +02:00
Adrien Destugues
d946ade025 ffmpeg: declare support for webm and 3gpp.
* Decoding works on the videos I tested with.
* Some videos on Youtube use these formats.
2014-04-10 08:50:57 +02:00
Adrien Destugues
41a807ec64 XHTML sniffing rule: handle utf-16 documents. 2014-04-10 08:50:56 +02:00
Adrien Destugues
a68efa7326 Add a mime type for XHTML and make Web+ the preferred app.
* WebPositive testsuite relies on the mimetype to parse xhtml files.
* This has a higher priority than HTML, because it is more reliably
detectable
* Uses the same icon as html and mhtml. Who wants to draw new ones?
2014-04-10 08:50:55 +02:00
Jérôme Duval
6fd00f80e8 scsi_periph: implemented VPD inquiry.
* declared block limits and logical block provisioning structs.
* based on SPC-4 and SBC-4 standards.
2014-04-09 20:40:11 +02:00
Pawel Dziepak
91810926dc scheduler: Fix and simplify thread migration logic in low latency mode
This patch remove the old thread migration logic which used few special
cases and (broken) general check that attempted to balance threads.

The new logic is pretty straightforward and seems perform well without
any additional special cases. Current core is compared with the least loaded
one and the thread is migrated if that would result in estimated loads of
both cores (i.e. the current one and the least loaded one) to become closer
to the average load (i.e. average of that two cores).
2014-04-09 03:24:34 +02:00
Pawel Dziepak
1bba129c56 scheduler: Let ThreadData::ShouldRebalance() choose the actual core
Currently, ThreadData::ShouldRebalance() (and mode specific functions
it calls) only decides whether to migrate thread to another core or not.
However, in most cases it actually needs to find the best candidate for
new core so it could as well return that information.
2014-04-09 03:24:34 +02:00
John Scipione
e439b00397 Fix button label position, try number 2
Create and use BLayoutUtils::AlignOnRect() to position the button label
in BControlLook::DrawLabel().

AlignOnRect(), unlike AlignInFrame(), provides the possibility to return
a rectangle with dimensions greater than the available size.

Add some comments above the methods in LayoutUtils that indicate such.

Also update copyright headers in LayoutUtils and ControlLook
2014-04-08 14:10:10 -04:00
John Scipione
f0fdd7b97a LayoutUtils: Use floorf() instead of floor() 2014-04-08 14:10:09 -04:00
John Scipione
6ecc270f57 LayoutUtils: Use std::max instead of max_c 2014-04-08 14:10:09 -04:00
John Scipione
04b48a29bd LayoutUtils: Style fix, remove leading space 2014-04-08 14:10:08 -04:00
John Scipione
4e8acd3232 ControlLook::DrawLabel() tiny style changes 2014-04-08 14:10:08 -04:00
John Scipione
c79ddce494 Revert "Fix button label position"
This reverts commit 1c69e1c306.
2014-04-08 14:10:07 -04:00
Adrien Destugues
f38165ad8c Add multipart/related MIME type for MHTML files.
* Uses the same icon as HTML. Anyone wants to design something better?
* Also add support to Web+ (not actually supported yet, but the next
version will).

These files are useful as self-contained documents (application
offline documentation), and for saving web pages in a single file.
2014-04-07 19:01:03 +02:00
Jessica Hamilton
c552bd6771 haiku_loader: search for matching shortcut in supermenus
Fixes #7469.
2014-04-07 22:14:08 +12:00
Stephan Aßmus
dc8a0aecf1 HaikuDepot: Set default icon for all packages. 2014-04-06 10:49:38 +02:00
Stephan Aßmus
726db742bd HaikuDepot: Implemented simple icon-cache.
* In a first round, icons are trying to be loaded
   from the icon cache.
 * In a second round, the cached icons are updated from the
   server, unless the icons files have been modified within
   the last hour. The web-app does support headers for checking
   if the resource has been modified since a certain date, however,
   with hvif being so small and the time it takes to connect to the
   server per individual icon being so relatively long, it doesn't
   seem worth it just yet to optimize for not actually getting the
   icon data in response.
2014-04-05 23:29:04 +02:00
Stephan Aßmus
f5ce3e39da HaikuDepot/SharedBitmap: switched to use BPositionIO...
...instead of BMallocIO specifically.
2014-04-05 23:29:03 +02:00
Jessica Hamilton
6242374090 Media Kit: fix use of pthread_once_init in FormatManager.cpp
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2014-04-04 22:25:46 +02:00
Adrien Destugues
8bbdad1487 FormatManager: actually return the singleton instance.
This should work better.
2014-04-04 12:42:14 +02:00
Jonathan Schleifer
6a2fd3a50e Add __dso_handle to bootloader and kernel
Clang references these when building for x86_64.
2014-04-03 19:19:33 +02:00
John Scipione
f5c284eeed Style fixes to BTextView 2014-04-02 19:38:25 -04:00
Adrien Destugues
638510600c Plugin loading: style fixes.
* Fix style issues pointed by stippi. Thanks!
* Rework the FormatManager instanciation to be thread safe.
2014-04-02 14:05:11 +02:00
Adrien Destugues
bf3b475c38 Urpdate AddOnManager and FormatManager for Media Kit
* These classes were moved from Media Server, making the use of ports
and messages to communicate with the app irrelevant.
* Split in a separate commit to help git keep track of moved files.

Fixes #4893.
2014-04-02 09:56:34 +02:00
Adrien Destugues
2feaa37f24 Move media plug-in support to application side.
The media server tried to use node monitoring to dynamically add and
remove plug-ins, but it isn't that useful:
* When a plug-in is added, applications would have to query the media
server to get an up to date list of available formats. For example
MediaConvert populates its format menus on startup.
* When removing a plugin, if an app already had it loaded, there is not
much that can be done to keep it working.
* The list of plugins was not sorted by directories (user vs system
add-ons), so the directories were re-scanned to make sure user add-ons
were returned first, rendering the node monitoring less interesting.

Now, the format handling is done by each application. The node
monitoring is removed, instead the apps will scan the plugin directory
when first using the media kit classes. Restarting the application is
needed to update the media formats list.
2014-04-02 09:56:32 +02:00
John Scipione
1c69e1c306 Fix button label position
This reverts a portion of hrev46580 concerning placement of a label on a button.
The label was draw too low on the button in some cases, notably in Keymap.
Restoring the old code for the icon-less case fixes the problem.

There still may be a problem drawing labels on buttons with icons, but, the code
should behave the same as it did in hrev46580 for that case, which is when
buttons with icons was introduced.
2014-04-01 17:19:00 -04:00
John Scipione
8fbf8d56f6 Time prefs: Enable add button if server name valid
* Add button is disabled initially (as the server name is blank)
* Use B_FAILURE_COLOR when server name is invalid instead of hardcoding red
* Some code refactoring
* Some style fixes
2014-03-31 18:57:46 -04:00
John Scipione
62b45ce190 Time prefs: Disable remove button if list empty 2014-03-31 18:46:12 -04:00
Adrien Destugues
48058f7bc9 Media_server: use find_paths_etc.
* Replace code to find the plug-ins with the new APIs.
* Prepare for hybrid-aware code (but we need to use the app
    architecture, not the media_server one)
2014-03-31 17:39:35 +02:00
Adrien Destugues
d71e18fef4 Build media plugins for the secondary arch.
These are used when an app uses BMediaFile/BMediaTrack, which leads to
the plug-ins being instanciated on the application side.

* Fixes one more part of #10049 (media add-ons are still missing).
* Will probably not solve any real-world issue because of #4893.
2014-03-31 15:32:31 +02:00
Adrien Destugues
943b310c90 Data URLs: fix size computation.
The decoded data is 3/4 the size of base64 encoded, not 4/3.
2014-03-31 09:59:12 +02:00
Jessica Hamilton
575984d2e5 MediaConverter: Filter out non-writable media file formats. Fixes #10724
* With the muxer & demuxer tables merged in hrev47063, the
   list of output formats included media file formats that
   weren't flagged as writable

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2014-03-31 08:15:00 +02:00
Stephan Aßmus
a87c4748e5 app_server: Restore previous rounding
46b39e8378 contained a change to the
rounding for non-subpixel-precise drawing. This changes it back
from using round() to casting to int32. This also reverts a change
to StrokeLine() which meant that lines on integer pixels appeared
at the same location regardless of using B_SUBPIXEL_PRECISE or not.
On further thought, this doesn't make any sense, since it means
to treat the meaning of coordinates different for stroking and
filling. This fixes WonderBrush's brush tip preview, but breaks
Gobe Productive's caret rendering for zooms smaller than 150%.
The change to the rounding fixes #10690.
2014-03-30 22:28:14 +02:00
Axel Dörfler
0acae24ee7 Added simple Alert test application. 2014-03-29 23:11:44 +01:00
Jonathan Schleifer
6c95865236 Replace a few equ with %define to make nasm happy
Interestingly, it only complained about some of them. Changing them all
to %define though, as equ means it should try to evaluate it once, which
of course it can't really if those are ebp+CONSTANT.

Didn't catch those since I wasn't building gcc2h.
Thanks to jessicah for reporting and testing the fix!
2014-03-29 05:07:54 +01:00
Rene Gollent
133af3f5e1 HaikuDepot: Fix x86 build. 2014-03-28 22:12:06 -04:00
Jonathan Schleifer
d6f8092732 Sorry, my last commit was incomplete 2014-03-29 02:29:52 +01:00
Stephan Aßmus
5bd5f161e8 HaikuDepot: Populate package icons from web app.
* Transformed ConnectionTest into WebAppInterface
 * Added methods to Model to trigger the population of all packages
   with additional information that is needed in the list view.
 * This launches a thread which tries to retrieve icons for all known
   packages from depot.haiku-os.org. This is uncached and very slow. I
   guess it could even be fast enough with a change to the protocol where
   icons are not retrieved one at a time.
2014-03-28 23:49:29 +01:00
Stephan Aßmus
b34f1a8b11 HaikuDepot: Refactored setting title and icon in listview...
... so that it is also done when a package state change notification
is received that has the icon bit set.
2014-03-28 23:49:28 +01:00
Stephan Aßmus
22949ba2ef HaikuDepot: SharedBitmap: Added loading from buffers.
Refactored loading from a buffer when loading from resources and
 re-used that for instantiating a SharedBitmap from a BMallocIO.
2014-03-28 23:49:27 +01:00
Jonathan Schleifer
a04a520b0d Switch back from yasm to nasm
These days, nasm supports more instructions than yasm. Additionally, it
offers a disassembler.
2014-03-28 23:10:24 +01:00
Adrien Destugues
626d341c24 ffmpeg media plugin: merge muxer and demuxer tables
* The media_file_format struct has B_READABLE and B_WRITABLE flags,
allowing us to tell which formats we support decoding and encoding
* This allows application to query for the supported decoding formats.
* Also adjust some of the MIME types to match what's actually used (eg.
in HTML5 audio).

This makes html5test.com detect which formats we declare we can decode.
2014-03-28 11:47:22 +01:00
Jonathan Schleifer
4626c49e32 desklink: Fix %ld being used instead of B_PRId32
Also enables -Werror.
2014-03-27 20:36:39 +01:00
Stephan Aßmus
4846299ab9 HaikuDepot: Test some web app features
* Invoke "getPkg" JSON API, doesn't work yet.
 * Download a package icon in HVIF, works nicely.
2014-03-26 23:02:48 +01:00
John Scipione
8d6d2daa3f Time: Remove superfluous MakeEmpty()
Thanks AnEvilYak
2014-03-26 17:51:14 -04:00
John Scipione
aa8033905a Time: Fix memory leak.
BListView::RemoveItem() doesn't delete the item, it just removes it
from the list. We have to delete the item to free the memory it
consumes ourselves.
2014-03-26 17:34:48 -04:00
John Scipione
14d7522197 Time: Style fixes to NetworkTimeView 2014-03-26 17:21:00 -04:00
Dariusz Knociński
39a1e74b08 Time Preferences crashes with empty selection
Application "Time" crashes when you push "Remove" button without any
selection on list of network time servers.

Fixes #10716

Please use git format-patch to create your patches in the future so that
the author information is preserved.

Signed-off-by: John Scipione <jscipione@gmail.com>
2014-03-26 16:56:49 -04:00
Jérôme Duval
aafc3386ef boot packagefs: Fix header path in zlib dependency
Thanks to Ingo for pointing at this better fix.
2014-03-26 19:38:30 +01:00
Axel Dörfler
d941d6bac3 Minor cleanup. 2014-03-25 23:36:21 +01:00
John Scipione
fc00fd8d91 build fix try number 2
Process Controller needs private shared headers for StringForSize.h
2014-03-25 15:16:13 -04:00
John Scipione
30dd4e6f70 fix build, update private headers
need to inform these apps that the location of about window has changed,
I must have had stale objects that made it appear to work initially.
2014-03-25 14:46:59 -04:00
John Scipione
9ce450b9c2 AboutWindow: Move to Interface Kit (still private) 2014-03-25 14:17:19 -04:00
John Scipione
78877e7200 AboutWindow: Add FBC padding 2014-03-25 14:07:46 -04:00
John Scipione
293d80be6f BAboutWindow: style fixes
* mostly whitespace fixes
* reorder methods
2014-03-25 14:07:44 -04:00
John Scipione
71e3210d35 AboutWindow: Right-align close button 2014-03-25 13:38:59 -04:00
John Scipione
f188f5ccfc AboutWindow: Simplify layout (de-ident)
There's no functional change here but this eliminates a redundant group.
2014-03-25 13:38:08 -04:00
John Scipione
924f8e5344 AboutWindow: Make FromSignature methods private 2014-03-25 13:37:01 -04:00
Stephan Aßmus
7f0d550a7c HaikuDepot: Forgot to add the new files. 2014-03-24 23:37:40 +01:00
Stephan Aßmus
f9ed97eaee HaikuDepot: Test app for haiku-depot-web connection
* Just a playground for getting my feet wet with communicating
   with the web-app. For now only connects over HTTP.
2014-03-24 23:36:13 +01:00
Stephan Aßmus
b25fb3d559 Add a few extensions to transport stream MIME type 2014-03-24 23:36:04 +01:00
Axel Dörfler
d7f7bf2d89 Renamed HaikuDepot's home to haikudepot.
* This closes #10699. I mentioned that to stippi after his first commit
  of HaikuDepot, anyway :-)
2014-03-24 22:25:21 +01:00
Stephan Aßmus
39fce398ee Raised maximum vector data size from 16 KiB to 512 KiB.
* The maximum vector icon data size was a bit low. That may
   be hard to track down why a certain vector icon doesn't work,
   especially when imported from SVG...
 * Don't allocate the vector buffer on the stack anymore.
2014-03-23 21:59:58 +01:00
Jonathan Schleifer
18bac98397 Fix missing includes in libbsd
This makes it compile with -Werror.
2014-03-22 21:23:30 +01:00
Jonathan Schleifer
d665b2637e Fix compilation of WebPositive on x86_64 2014-03-22 02:33:29 +01:00
John Scipione
fd3fa9178b KeyMap: Redo modifier keys layout
... by using a group layout inside of a grid layout we can get this
to layout how we want it without having to calculate the label
widths manually.
2014-03-21 17:26:28 -04:00
Zhuowei Zhang
8512f7b056 Added a simple window to display console messages (fixes #10410)
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2014-03-21 08:47:20 +01:00
John Scipione
449d68282f KeyMap: Fix alignment of role labels
... by setting all labels to take up the width of the longest label.

Fixes #10693
2014-03-20 12:44:39 -04:00
Jérôme Duval
0b565a6f51 boot packagefs: Fix zlib dependency declaration 2014-03-19 20:19:17 +01:00
Jérôme Duval
ab1f2cd08d intel_extreme: read and loop for new interrupts. Fix #9718.
* MSI seems to trigger the need to loop: interrupts are not generated for bits
set while we process.
2014-03-18 21:43:31 +01:00
Stephan Aßmus
4fc7f247a8 HaikuDepot: Introduce new PackageState' pending'
When installing a package, it is set to pending, which removes
the Install button from the package info area. When multiple
packages are downloaded, theould all be put to pending,
right now, they will still offer to be installed, although they
are already scheduled for downloading. Requesting a package to
be installed when it is already schduled will mess things up later.
Godm, I hate this nano bug...
2014-03-18 21:02:24 +01:00
Stephan Aßmus
244796701b app_server: store and restore fill rule...
...when sending the whole view state over the link.
Also inherit the fill rule when pushing states (DrawState
copy constructor). A somewhat sloppy oversight, I must add.
2014-03-17 22:55:47 +01:00
Jonathan Schleifer
3c87457022 More B_PRId32
(I wonder why the last build worked without patching this, though.)
2014-03-17 21:51:43 +01:00
Julian Harnath
e815ef0795 DriveSetup: check if editor view exists in AbstractParametersPanel
* Base class needs to check this as well because the subclass might
  not override it (e.g. InitParametersPanel).

* Fixes crash when trying to initialize partition map. Thanks to
  jessicah for pointing this out.
2014-03-17 20:50:35 +01:00
Jessica Hamilton
181948a678 libbe_build: fix unterminated string in BEntry::set. Fixes #10686.
Signed-off-by: Stephan Aßmus <superstippi@gmx.de>
2014-03-17 18:21:39 +01:00
Pawel Dziepak
b167307526 kernel: Properly synchronize suspending new thread
After load_image() the child thread is suspended and the parent is
expected to resume it later. However, it is possible that the parent
attempts to resume its child after it has been notified that the image
had been loaded but before the child managed to suspend itself. In such
case the child would suspends itself after that wake up attempt and,
consequently will not be ever resumed.

To mitigate that problem flag Thread::going_to_suspend has been added
which helps synchronizing thread suspension and continuation in a similar
way that "traditional" thread blocking is performed. This means that
the child should behave in a following manner: set its going_to_suspend flag,
notify the parent (i.e. any thread that may want to resume it), acquire
its scheduler_lock and suspend itself if the going_to_suspend flag is set.
The parent should follow pattern: clear going_to_suspend flag of the thread
that is about to be resumed, acquire that thread scheduler_lock and enqueue
it in a run queue if it is suspended.

Thanks Oliver for reporting the bug and identifying what causes it.
2014-03-17 02:40:12 +01:00
Pawel Dziepak
d7e1e3e012 kernel/UserEvent: Make sure UserEvent object is valid during DPC
Most of the actual UserEvent work is done in DPC so that we don't have
to care about the limitations of the context in which UserEvent::Fire()
is invoked. This requires appropriate management of lifetime of UserEvent
instances to make sure that DoDPC() method is always called on a valid
object.
2014-03-17 02:40:12 +01:00
Jonathan Schleifer
998f404369 Use B_PRI* instead of PRI*
Sorry, didn't realize they're not the same on 32 bit systems.
2014-03-16 00:08:10 +01:00
Jonathan Schleifer
a10ad54c6b Fix a few %l* instead of PRI*32 2014-03-15 23:37:57 +01:00
Jonathan Schleifer
fee49d2f35 haiku3d: Fix type mismatches on x86_64 2014-03-15 23:37:56 +01:00
Axel Dörfler
634c2c68b2 HaikuDepot: added "available" filter.
* That's the only one I would ever want to see (in most cases).
* I must admit that I don't really understand why the lists are created
  and updated only for filtering, instead of just testing against the
  package state.
* However, I also have no idea, why the NotContainedInFilter does not
  work. I left it in because someone might see what I didn't, and maybe,
  if the first confusion is cleared, it might even find some use.
2014-03-12 21:49:09 +01:00
Axel Dörfler
5f448959ec HaikuDepot: Minor style cleanup. 2014-03-12 21:49:09 +01:00
Stephan Aßmus
1e625a2b08 app_server: Removed duplicate line of code...
for setting the filling rule. There are only two different rasterizers.
2014-03-11 22:11:08 +01:00
Stephan Aßmus
b74fecd7aa app_server: Update and use the fill rule in all cases.
* It was previously not used for gradient rendering.
 * It was not updated when the DrawState was set.
 * Not actually tested, yet.
2014-03-11 21:06:26 +01:00
Adrien Destugues
eb43166326 app_server & interface kit: support fill rules.
* BView gets SetFillRule/FillRule methods. The fill rule is part of the
view state.
* The B_NONZERO rule is the default. This is what we implemented before.
* The B_EVEN_ODD rule is the other common possibility for this, and
we need to support it to help WebKit to render properly.
2014-03-11 17:27:42 +01:00
Philippe Saint-Pierre
98e26ff242 Hey: more style fixes, no functionnal changes intended 2014-03-10 22:15:36 -04:00
Adrien Destugues
ba5172cccb pthread: allow NULL thread to compare equal.
- POSIX says the behavior for pthread_equal is undefined for
uninitialized arguments.
- However, gcc C++11 threads supports expects C++-compatible behavior,
that is, two uninitialized pthread_t should compare equal.

Avoids some runtime asserts in latest WebKit version.
2014-03-09 22:26:36 +01:00
Pawel Dziepak
0012ba6a87 scheduler/low_latency: Try harder to balance load
In low latency mode the scheduler would not attempt to balance load
on not heavily loaded cores unless difference in load exceeded
kLoadDifference * 2 (i.e. 40 percentage points), which does not seem
to be good enough.
2014-03-09 19:58:11 +01:00
Pawel Dziepak
a57a7a8c6d scheduler: Fix load update on idle cores
To make sure that load statistics are accurate on idle cores each time
idle thread is scheduled a timer is set to update load when current
load measurement interval elapses. However, core load is defined as the
average load during last measurement interval and idle core may be still
considered busy if it was not idle during entire measurement interval.
Since, load update timer is a one shot timer that information will not be
updated until the core becomes active again.

To mitigate that issue load update timer is set to fire after two load
measurement intervals had elapsed.
2014-03-09 19:58:11 +01:00
Pawel Dziepak
5df1ecb2ab x86_64: Relax ltr operand constraint
Any 16 bit general puprose register can be a ltr operand, no need
to force AX.
2014-03-09 19:58:10 +01:00
Pawel Dziepak
1700e825b1 scheduler: Always protect gCore[High]LoadHeap with spinlock
Should fix #10628. If there is a race condition with a writer getting
minimum or maximum from double ended heap may incorrectly result NULL.
Which is not expected in the most of the thread migration logic. Apart
from that, because of the race condition heap state may be observed as
inconsistent thus failing assertions.
ended heap
2014-03-09 19:58:10 +01:00
Rene Gollent
198fd05030 Debugger: Handle DW_AT_signature.
- Per DWARF4's specification, if a type's complete definition is
  contained in a .debug_types unit, it should be referenced via the
  DW_AT_signature attribute. 4.8 now actually does this rather than
  setting e.g. DW_AT_attribute_origin to a signature ref, and
  consequently we weren't finding said reference any more.

Gets .debug_types section support working again.
2014-03-09 10:10:34 -04:00
Rene Gollent
0da0db4da0 Debugger: Partly rework hrev46696.
- Various other places in Debugger expect the highpc attribute to be
  an address rather than an offset. As such, resolve it to one when
  setting the attribute in the corresponding DIE so the resolved value
  is available everywhere. Fixes variable scopes not being computed
  properly, and consequently the missing variables mentioned in the
  previous commit.

This gets things working properly again under gcc4.8.
2014-03-08 23:00:51 -05:00
Rene Gollent
3414d0b64d Debugger: Fix program counter handling issue.
- For DWARF4, lowpc/highpc can be specified as constants in addition
  to addresses. Furthermore, they can also be specified such that highpc
  is a relative offset from lowpc rather than an absolute address. We
  weren't handling this case, which gcc4.8 is now using when emitting
  version 4 debug information. Fixes another part of #10659.

There still remains a problem with regards to class/structure variables not
showing up in the local variables view.
2014-03-08 22:40:33 -05:00
Murai Takashi
982b4e9809 Fix mismatching allocation and deallocation
Fixes ticket #10374

Signed-off-by: Philippe Saint-Pierre <stpere@gmail.com>
2014-03-08 20:29:53 -05:00
Julian Harnath
119bf0013c Fix empty parameter dialog in DriveSetup
* When the add-on provides no parameter editor, still add the set of
  of default controls instead of just bailing out of the Init()
  method.

* Before, DriveSetup never added the default controls in such cases
  and simply showed an empty window. This happened when e.g. trying
  to create a new partition inside an extended partition (because
  ExtendedPartitionAddOn provides no parameter editor).

* Fixes #10569
2014-03-08 23:27:11 +01:00
John Scipione
5d98ee1e4d Revert "BScrollView: Increase small scroll step size from 1 to 3"
This reverts commit bdcfc07617.
2014-03-08 15:18:35 -05:00
Philippe Saint-Pierre
1166849963 Hey: use delete[] instead of free (CID #990947 and CID #990948) 2014-03-08 13:34:44 -05:00
Philippe Saint-Pierre
6fef592d6b Hey: Style fixes, code clean up
No functional changes intended
2014-03-08 13:31:29 -05:00
Rene Gollent
c9eb4468ca Debugger: Add handling for rvalue reference type entries.
Fixes part of #10659.
2014-03-08 12:44:46 -05:00
Rene Gollent
84e7206b05 Style fix. 2014-03-08 09:46:13 -05:00
Rene Gollent
b7282c5f2e Fix #10610.
Added missing initializer for fContext in PackageInfoErrorListener whose
absence was leading to crashes when generating the error string.
2014-03-08 09:44:13 -05:00
Julian Harnath
b3892782a6 Look at the internal encoder to pick the link
* When determining the output link, look at the internal encoder in
  the transmitter setup.

* Fixes getting no picture on digital output of certain systems.
2014-03-08 10:47:14 +01:00
John Scipione
0a2382e373 ShowImage: Scroll horizontally with control
...instead of command.

See http://www.freelists.org/post/haiku-commits/haiku-hrev46304-srckitsinterface,18
2014-03-07 19:11:48 -05:00
John Scipione
a6213356bc BView: scroll horizontally when holding control
... instead of vertically. This actually swaps horizontal and vertical
so if you have a mouse with a fancy 2-axis scroll ball it will swap
the x and y coordinates. (untested)
2014-03-07 19:11:46 -05:00
John Scipione
ab5c74422e BView: ScrollWithMouseWheelDelta return status code 2014-03-07 19:11:44 -05:00
John Scipione
b2404e2a39 BView: Check scroll delta isn't 0 2014-03-07 19:11:43 -05:00
John Scipione
5b6c94c591 ShowImage: Style fixes related to scrolling 2014-03-07 19:11:41 -05:00
John Scipione
b9f48ef8f6 WebPositive: style fixes related to scrolling
rename dy to deltaY
2014-03-07 19:11:39 -05:00
John Scipione
bdcfc07617 BScrollView: Increase small scroll step size from 1 to 3
... and then don't multiply by 3 in BView
2014-03-07 19:11:37 -05:00
John Scipione
c4337a4324 BView: style fixes related to mouse scrolling 2014-03-07 19:11:35 -05:00
John Scipione
b7929c0574 BScrollBar: style fixes, update copyright header 2014-03-07 19:11:33 -05:00
John Scipione
86bdb1b69d Style fixes to BStringItem 2014-03-07 13:55:43 -05:00
John Scipione
e3e82c7972 GIFTranslator: Increment settings refcount
So that the settings object won't be destroyed when released on the
the view destructor.

Fixes #10646
2014-03-06 19:19:04 -05:00
John Scipione
b365777b74 Add curly braces, int created 2014-03-06 19:07:58 -05:00
John Scipione
89e849e326 GIFTranslator: Style, alphbetize 2014-03-06 18:40:04 -05:00