Commit Graph

713 Commits

Author SHA1 Message Date
Alex Smith
e27109c167 Merge branch 'master' into x86_64 2012-07-30 08:24:31 +01:00
John Scipione
b79561ad9c Redo some reverted style changes. 2012-07-30 02:45:45 -04:00
John Scipione
78341a9351 Revert "Fix gcc2 build on Mac OS X Lion"
now that Alex Smith has fixed the build system on Lion this
work-around can now be reverted.

This reverts commit 7c369a4b3f.
2012-07-30 02:10:08 -04:00
John Scipione
c15ad4e6b9 Space after for, thanks Ryan 2012-07-30 01:59:11 -04:00
John Scipione
1ac528017d Refactor IconUtils.cpp
Mostly style changes, some functional changes although there is no
change in functionality for the success case, just cleaner code.
2012-07-29 13:07:45 -04:00
John Scipione
1510ac0081 Refactor icon scaling, fix off-by-one error.
Refactor the icon scaling code in IconUtils.cpp to avoid code
duplication. Basically create and delete the temp bitmap to
convert from B_CMAP8 to B_RGBA32 for scale2x/scale3x/scale4x
just one time instead of 3.

There was an off-by-one error in Deskbar which was causing
it to scale up the 16x16 Bitmap icon to 32x32 instead of just
using the 32x32 icon. This only affected BeOS bitmap-based
icons, not Haiku HVIF icons.
2012-07-28 22:00:22 -04:00
John Scipione
e51854a127 Add 96x96 and 128x128 icon sizes to tracker including scaling of BeOS icons using scale3x and scale4x algorithms. 2012-07-28 14:07:43 -04:00
Alex Smith
5f6b522746 Merge branch 'master' into x86_64 2012-07-21 14:17:22 +01:00
Alex Smith
e6e6f56ccf Include compat/sys/kernel.h rather than "kernel.h".
Using "kernel.h" was pulling in the private kernel.h header instead,
which was causing a build failure on my branch since arch_cpu.h is
C++-only there.
2012-07-21 14:09:08 +01:00
Alex Smith
82694bd124 Merge branch 'master' into x86_64
Conflicts:
	headers/posix/arch/x86_64/arch_setjmp.h
	src/system/kernel/cache/block_cache.cpp
2012-07-20 18:33:46 +01:00
Fredrik Holmqvist
a2e7d8df7b callout_schedule uses ticks as timeunit, not usecs.
As suggested by Rene Gollent, we used ticks as usecs.
2012-07-18 17:09:36 +02:00
Fredrik Holmqvist
4feeeb4a8f Don't write wast amounts of debug info about scanning. 2012-07-18 15:32:58 +02:00
Fredrik Holmqvist
19d67b5513 This is set in opt_wlan.h, and should only be done in one place. 2012-07-18 15:32:58 +02:00
Fredrik Holmqvist
73fc635b3d Tick at 1000Hz not 1MHz.
Our FreeBSD networking code defined hz to 1MHz and 1 tick = 1 / hz,
but the clock code ticked 1 tick at 1000Hz.

This caused all calculations that are done on ticks, autonegotiation
and wlan scanning to be done very often as FreeBSD uses 1000 Hz
(100Hz for ARM). Defaults for autonegotiation is 5 and 17 ticks.

(Another interesting thing is that callouts are using 8% cpu...)
2012-07-16 13:52:08 +02:00
Alex Smith
5774b5afa4 C++ified remaining C users of arch_cpu.h. 2012-07-12 13:54:18 +01:00
Stephan Aßmus
2d35ee03c0 Added operator== implementation 2012-05-06 16:50:02 +02:00
Alex Wilson
45f28e068b Fix error in height calculation in alm/SharedSolver. 2012-05-03 08:45:45 +12:00
Alex Wilson
c8b24e3eb5 Fix BALMLayout archiving issues.
SharedSolver was archiving too many constraints, partly because of
multiple typos, also because it archived some which were just artifacts
of the layout process. These extra constraints are created when the
layout calls SetRange() on the left/top/right/bottom tabs during layout.

* LinearSpec/ActiveSetSolver had to be adjusted to get access to the
  constraints added by the SetRange() calls.
* BALM::TabBase was adjusted to avoid a segfault during unarchiving,
  caused by an unitialized member.
* ALMFriendLayoutTest was adjusted to include a more obvious custom
  constraint for testing.
2012-05-03 08:45:44 +12:00
Alex Wilson
5f4e71ba4c Replace BALMLayoutBuilder::Snake class with a stack.
The interface to BALMLayoutBuilder is still pretty much the same, but
this simplifies the class a bit.
2012-05-03 08:45:43 +12:00
Alex Wilson
d10cb215dc in BALMLayout::DefaultPolicy, call printf instead of debugger.
This is more user friendly, debugger() was a bit drastic.
2012-05-03 08:45:42 +12:00
Alex Wilson
df2ad52040 Archive more details about areas in BALMLayout. 2012-05-03 08:45:37 +12:00
Alex Wilson
0a5e130725 Make SharedSolver BArchivable to save extra user constraints. 2012-05-03 08:45:36 +12:00
Alex Wilson
bad1d6ba7e Make Variable::SetRange() more forgiving. 2012-05-03 08:45:35 +12:00
Alex Wilson
015e5f06d8 Make BALMLayout::BadLayoutPolicy archivable. 2012-05-03 08:45:34 +12:00
Alex Wilson
35bf0b5c1c Add initial support for archiving a BALMLayout.
What's supported:
* basic archive/instantiate
* friend layouts
coming soon:
* saving of custom restraints
* archiving of BadLayoutPolicy
2012-05-03 08:45:32 +12:00
Alex Wilson
f9c58743e3 Fix possible NULL dereference in TabBase::IsInLayout(). 2012-05-03 08:45:31 +12:00
Alex Wilson
0a408e4992 Make it possible to have a Variable not belonging to any LinearSpec. 2012-05-03 08:45:27 +12:00
Alex Wilson
bc7956c7cf Use const overloading on BALMLayout::{X|Y}TabAt(). 2012-05-03 08:45:26 +12:00
czeidler
d7568eabd2 Add IndexOf methods. 2012-05-03 08:45:25 +12:00
czeidler
15ef732f0d Check first if we own the constraint before deleting it. 2012-05-03 08:45:23 +12:00
Alex Wilson
4878cc70e2 Don't remove ourselves from a BLayoutContext when it is leaving. 2012-05-03 08:45:22 +12:00
czeidler
c4340eab04 Fix row column weight. 2012-05-03 08:45:21 +12:00
czeidler
35babcf06d Allow left and top tab to be NULL. 2012-05-03 08:45:19 +12:00
Alex Wilson
0bd511a331 Avoid use after free in RowColumnManager.cpp
Fixes CID 10862
2012-05-03 08:45:18 +12:00
Alex Wilson
681f48fcbc Replace BALMLayout::Ordered*Tabs() method with *TabAt(int, bool sorted). 2012-05-03 08:45:17 +12:00
Alex Wilson
6169a6e3d1 Minimize the effect invisible items have on a BALMLayout.
There seems to still be some effect on positioning, but invisible items
no longer constrain the layout.
2012-05-03 08:45:16 +12:00
Alex Wilson
fbd2dfcf17 Refactor ActiveSetSolver::Find{Min|Max}s(). 2012-05-03 08:45:13 +12:00
Alex Wilson
a9242e3d98 Properly handle unbounded results in SharedSolver::Validate{Min|Max}() 2012-05-03 08:45:12 +12:00
Alex Wilson
1cbe95140a Refactor SharedSolver::Validate*() methods a bit more. 2012-05-03 08:45:10 +12:00
Alex Wilson
3ade12dd15 Make BALMLayout::BasePreferredSize() useful again. 2012-05-03 08:45:09 +12:00
Alex Wilson
09e87fa352 Pass more information to BadLayoutPolicy.
Also, re-add BadLayoutPolicy invocations, which were lost while creating
SharedSolver.
2012-05-03 08:45:06 +12:00
Alex Wilson
93904ad087 Have SharedSolver return the solver result from Validate*() methods. 2012-05-03 08:45:05 +12:00
Alex Wilson
82a0965357 Improve efficiency when validating an ALM layout. 2012-05-03 08:45:04 +12:00
Alex Wilson
419fe0b8ae Introduce SharedSolver class to improve BALMLayout's friend feature. 2012-05-03 08:45:02 +12:00
Alex Wilson
708a298e22 Refactor XTab and YTab to share a common base, TabBase.
TabBase takes care of layout tracking etc..
2012-05-03 08:45:01 +12:00
Alex Wilson
a9761aedbf Refactor BALMLayout::AddItem to reduce repitition. 2012-05-03 08:45:00 +12:00
Alex Wilson
93977272f4 When adding tabs to a BALMLayout, ensure they are fully added. 2012-05-03 08:44:58 +12:00
Alex Wilson
c761a8a6d4 Let BALM::{X|Y}Tabs be in multiple BALMLayouts, if they are friendly. 2012-05-03 08:44:55 +12:00
Alex Wilson
f9cabdd009 Use BReferenceable properties of LinearSpec in BALMLayout.
This saves us from a potential use-afte-free bug.
2012-05-03 08:44:54 +12:00
Alex Wilson
f6db102e47 Make BALMLayout respect its position when nested. 2012-05-03 08:44:50 +12:00
Alex Wilson
51b5b66b01 Remove lp_solve as a dependency of the linprog lib.
Really, it hasn't depended on lp_solve for a while, but it was still
linked in in some places.
2012-05-03 08:44:48 +12:00
Alex Wilson
2bbf8b1fbc Add the ability to handle bad layouts to BALMLayout. 2012-05-03 08:44:45 +12:00
Alex Wilson
57d93f836d Disable debug output by default in linprog. 2012-05-03 08:44:44 +12:00
Alex Wilson
3479e516b7 Compose spacing given to BALMLayout constructor. 2012-05-03 08:44:43 +12:00
Alex Wilson
20cc993ab5 Remove BALM::Area::fConstraints field, which is not needed.
It's easier to just delete all the constraints in the dtor, the ones that
wouldn't have been in fConstraints are NULL at this point anyway.
2012-05-03 08:44:39 +12:00
Alex Wilson
895414da9d In BALM::Area rename fTopLeftInset to fLeftTopInset.
This is consistent with for instance, the BSize ctor.
2012-05-03 08:44:38 +12:00
Alex Wilson
f0307e765e Fix spacing before first header in src/libs/alm.
Also add copyright header in ALMGroup.cpp.
2012-05-03 08:44:36 +12:00
Alex Wilson
324ce2851d Add FBC padding to ALM classes. 2012-05-03 08:44:35 +12:00
Alex Wilson
7e021d45da Make BALM::InsetForTab() methods const. 2012-05-03 08:44:34 +12:00
Alex Wilson
0da6f2e916 Rename BALM::GroupItem to BALM::ALMGroup, and move it to its own files.
Also make ALMGroup totally self-contained, i.e. BALMLayout no longer
does the parsing, and is completely unaware of ALMGroup. A small touch
of refactoring as well.
2012-05-03 08:44:32 +12:00
Alex Wilson
a25ffa4f04 Style cleanup in alm: mostly clean includes. 2012-05-03 08:44:31 +12:00
Alex Wilson
7dd17203c8 Make Area insets more consistent with other HAIKU inset APIs. 2012-05-03 08:44:29 +12:00
Alex Wilson
d814593064 Remove BALMLayout::Add*To* methods, which are availabe in the builder. 2012-05-03 08:44:26 +12:00
Alex Wilson
50cc24b3f9 Add a Builder for BALMLayout. 2012-05-03 08:44:23 +12:00
Alex Wilson
b50d4ed8bd Add new methods to BALMLayout for adding multiple x/y tabs at once. 2012-05-03 08:44:22 +12:00
Alex Wilson
8b52747974 In Area, remove unused ItemFrame() method.
Also modify Frame() method to return a rect with rounded coordinates.
2012-05-03 08:44:21 +12:00
Alex Wilson
574533ef12 In BALMLayout, make AddView(...) consistent with other layouts.
If a BView is added which has a BLayout, use the layout as a BLayoutItem
to represent that view, as other layouts do.
2012-05-03 08:44:19 +12:00
Alex Wilson
75e2dcf8fe In BALMLayout, allow for more flexibility in spacing and insets.
* allow for independent left, top, right and bottom insets
* allow for independent vertical and horizontal spacing between tabs
* allow for the usage of Haiku's spacing constants such as B_USE_WINDOW_INSETS
2012-05-03 08:44:17 +12:00
Alex Wilson
fefa17f47e Remove unused 'PerformancePath' stuff. 2012-05-03 08:44:14 +12:00
czeidler
c3e57dc36d Give the area an id. 2012-05-03 08:44:13 +12:00
czeidler
b7630c4c98 Save and restore layout. 2012-05-03 08:44:11 +12:00
czeidler
99a7ed4d4b Remove lp_solve from the source and from the image.
Its not used anymore and should be an optional package otherwise.
2012-04-30 14:58:14 +12:00
Oliver Tappe
546208a539 More catalog-related cleanup.
* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
  B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.
2012-04-16 21:31:22 +02:00
John Scipione
7c369a4b3f Fix gcc2 build on Mac OS X Lion.
The gcc2 cross-compiler built on Mac OS X Lion has a bug in it
where it is erroring with 'cast specifies signature type' when
assigning 0 or NULL to a pointer to a member fuction. NULL in this
instance is correctly converted to 0 since it is illegal to assign
((void*)0) to a pointer to a member function. However, it should
be legal to assign 0 to a pointer to a member function. Thus, there
is a bug.  Since I can't fix the gcc2 compiler I am working around
this bug by assigning the pointer to a do nothing function instead.

My host compiler version is
i686-apple-darwin11-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)

The same error occurs using the default gcc-llvm compiler and
a standard gcc 4.61 built from source. This bug does not occur on
Mac OS X 10.6 gcc2 or gcc4, nor does it occur on Mac OS X 10.7 with
the gcc4 cross-compiler.

If and when we decide to finally leave gcc2 behind we can revert this
change.
2012-04-07 06:21:26 -04:00
Jérôme Duval
362efe0c9f freetype: builds against the 2.4.6 optional package.
* added optional feature package for freetype 2.4.6 gcc4/gcc2 x86 and gcc4 ppc.
* FT_CONFIG_OPTION_SUBPIXEL_RENDERING is disabled, --include-patented-code doesn't
  change this setting anymore. This would require different packages.
* drop freetype sources and headers from the tree.
* fix decorators, test app server and appearance to use feature package headers.
* hybrid build untested.
2012-03-17 20:37:00 +01:00
Jerome Duval
15f3f679cb atheroswifi: try at fixing #8351
* ath introduced an inconsistency between driver module name and driver_t name
  which the compat layer uses to lookup driver symbol
* we now use ath_pci instead of ath as driver_t name member.
* trace a message when a symbol can't be found during driver module search.
2012-02-25 15:38:46 +01:00
Jérôme Duval
1d95605a03 FreeBSD compat layer: net80211 workaround for Haiku.
* directly call the output hook as before the net80211 code merge
2012-02-15 23:06:06 +01:00
Jérôme Duval
5f1c0791b3 merged changes from FreeBSD 9.0 for most wlan drivers and net80211.
* merged changes from FreeBSD 9.0 for most wlan drivers except atheroswifi and net80211.
* added iwlwifi-6000g2b-ucode-18.168.6.1
2012-02-15 00:56:04 +01:00
Jérôme Duval
8060e7787f Network drivers are updated from FreeBSD 9.0
* updated drivers are 3com, ar81xx, atheros813x, attansic_l1, attansic_l2,
  broadcom440x, broadcom570x, dec21xxx, ipro100, ipro1000, jmicron2x0,
  marvell_yukon, nforce, rtl8139, rtl81xx, syskonnect, via_rhine, vt612x
2012-02-09 19:52:04 +01:00
czeidler
e4ff57c33f Use correct ALM variable index.
There is list of all variables and a list of variables used by contraints. When editing the min, max variable constraints access the
correct list.
2012-01-19 09:31:48 +13:00
Alexander von Gluck IV
67f3236e6a glut: Ensure Mesa dependency is met before compiling 2012-01-11 22:01:12 -06:00
Alexander von Gluck IV
7b2c1ed631 glut: build and link into libGL 2012-01-11 16:55:15 -06:00
Alexander von Gluck IV
77d663c3ea Remove the Haiku Mesa fork 2012-01-08 01:12:54 -06:00
Alexander von Gluck IV
da46520777 Break glut out from mesa lib
As glut is no longer in upstream Mesa and no longer developed
we will need to keep a fork.
2012-01-08 00:15:58 -06:00
Philippe Saint-Pierre
c5e599ac1a IconUtils: memory leak fix
The intermediate step BBitmap in scale2x wasn't deleted. CID 10692.
2012-01-02 21:07:55 -05:00
Urias McCullough
f1b76720ea Disable DEBUG build of 3rd party libgutenprint
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2012-01-02 17:15:27 -05:00
Philippe Saint-Pierre
5e783d6ad7 libgutenprint: channel.c: Defer assigment after NULL check
To avoid hypothetical NULL dereference. CID 10821, CID 10822

(patch sent upstream)
2011-12-29 15:51:38 -05:00
Urias McCullough
baadc350b5 Fix ASSERT that wasn't altered back in hrev39770, allows debug build to succeed
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2011-12-27 23:05:56 -05:00
czeidler
85f746c030 Don't read beyond the matrix boundaries. This should fix #8244.
* Use std methods when possible.
2011-12-21 17:44:23 +13:00
Alex Wilson
a84e14ca84 Merge branch 'master' of git://github.com/haiku/haiku 2011-12-15 20:50:28 -07:00
John Scipione
0e35d5d2e5 Change instances of wether in comments to whether. No functional change intended. 2011-12-12 14:41:49 -05:00
czeidler
8cfe0f458c When calculating the min, max and pref size, relax the range of the right and bottom tab. These tabs are set to the layout borders again when solving the layout. 2011-12-08 11:22:09 +13:00
Michael Lotz
b39f919dbf Remove the root device from the root devices list.
The device is added to the root devices list when initializing, but was
not removed from there again when the root device was removed and freed,
causing the list to have a stale entry. Probably fixes #3305.

The list is populated once for the _fbsd_init_hardware iteration and, if
a device was found, again for _fbsd_init_drivers. The only thing I don't
understand is why it didn't just always crash, as there should have been
a stale list entry in any case when a supported device actually was found...
2011-12-03 23:05:30 +01:00
czeidler
056207eedd Cleanup the constraint solver a bit and fix a bug when a variable is removed. 2011-11-30 18:22:39 +13:00
czeidler
57014d1ff7 Make tabs BReferenceable. Maintain a list of tabs. 2011-11-30 17:55:36 +13:00
Alexander von Gluck IV
0fa9729668 Add support for newer Realtek RTL8105E ethernet card revision
* backport from recent FreeBSD rt driver
* tested working on my HP Pavillion g7
* aka scalpel vs chainsaw
2011-11-29 15:12:22 -06:00
Philippe Saint-Pierre
08eb0b74a9 Move the NULL check before the dereferencing try
CID 5968
2011-11-27 12:36:40 -05:00
Oliver Tappe
323b65468e Filtered flat import of Oliver's svn package management branch
Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
  deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
  <directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
  DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
  ~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.
2011-11-25 06:17:07 +01:00
Oliver Tappe
ae90193596 Introduce __set_errno() throughout libroot.
* add errno_private.h, which defines the __set_errno() macro with
  and without tracing
* instead of setting errno manually, all libroot's code now invokes
  __set_errno(), which makes it much easier to trace changes to errno
* redirect glibc's use of __set_errno() to our own version
2011-11-24 23:48:18 +01:00
Alex Wilson
17499672a0 Bring BALMLayout in line with changes to BLayout. 2011-10-28 14:16:46 -06:00